mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-10-31 16:02:43 +01:00 
			
		
		
		
	Explicitly cast ustring to string when passing to fmt
don't rely on implicit conversion which is no longer present in fmt 10.1.0 Fixes #2403
This commit is contained in:
		| @@ -93,7 +93,7 @@ template <> | ||||
| struct formatter<Glib::ustring> : formatter<std::string> { | ||||
|   template <typename FormatContext> | ||||
|   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 | ||||
|   | ||||
| @@ -22,7 +22,7 @@ struct fmt::formatter<Glib::VariantBase> : formatter<std::string> { | ||||
|   template <typename FormatContext> | ||||
|   auto format(const Glib::VariantBase& value, FormatContext& ctx) { | ||||
|     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 { | ||||
|       return formatter<std::string>::format(value.get_type_string(), ctx); | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jan Palus
					Jan Palus