update to use fmt-based apis

Not complete, but a first big stab converting users of Mu::Error and
various g_warning & friends, format to the new libfmt-based APIs.
This commit is contained in:
Dirk-Jan C. Binnema
2023-07-05 23:10:13 +03:00
parent 742ca33740
commit 4920b56671
46 changed files with 435 additions and 449 deletions

View File

@ -347,8 +347,7 @@ Mu::time_to_string(const char *frm, time_t t, bool utc)
});
if (!dt) {
g_warning("time_t out of range: <%" G_GUINT64_FORMAT ">",
static_cast<guint64>(t));
mu_warning("time_t out of range: <{}>", t);
return {};
}
@ -356,7 +355,7 @@ Mu::time_to_string(const char *frm, time_t t, bool utc)
auto datestr{to_string_opt_gchar(g_date_time_format(dt, frm))};
g_date_time_unref(dt);
if (!datestr)
g_warning("failed to format time with format '%s'", frm);
mu_warning("failed to format time with format '{}'", frm);
return datestr.value_or("");
}
@ -692,7 +691,7 @@ __attribute__((format(printf, 2, 0)))
static bool
print_args (FILE *stream, const char *frm, va_list args)
{
gchar *str;
char *str;
gboolean rv;
str = g_strdup_vprintf (frm, args);