mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Merge pull request #2409 from jpalus/fmt-cast-ustring-to-string
This commit is contained in:
commit
66b71cc857
@ -93,7 +93,7 @@ template <>
|
|||||||
struct formatter<Glib::ustring> : formatter<std::string> {
|
struct formatter<Glib::ustring> : formatter<std::string> {
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const Glib::ustring& value, FormatContext& ctx) {
|
auto format(const Glib::ustring& value, FormatContext& ctx) {
|
||||||
return formatter<std::string>::format(value, ctx);
|
return formatter<std::string>::format(static_cast<std::string>(value), ctx);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // namespace fmt
|
} // namespace fmt
|
||||||
|
@ -22,7 +22,7 @@ struct fmt::formatter<Glib::VariantBase> : formatter<std::string> {
|
|||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const Glib::VariantBase& value, FormatContext& ctx) {
|
auto format(const Glib::VariantBase& value, FormatContext& ctx) {
|
||||||
if (is_printable(value)) {
|
if (is_printable(value)) {
|
||||||
return formatter<std::string>::format(value.print(), ctx);
|
return formatter<std::string>::format(static_cast<std::string>(value.print()), ctx);
|
||||||
} else {
|
} else {
|
||||||
return formatter<std::string>::format(value.get_type_string(), ctx);
|
return formatter<std::string>::format(value.get_type_string(), ctx);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user