mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 05:31:07 +00:00
tools: Drop unnecessary conditionals
We require GLib 2.76 now.
This commit is contained in:
parent
08fd9e1f2e
commit
e523d3a50e
@ -49,22 +49,6 @@ usage (void)
|
||||
exit (1);
|
||||
}
|
||||
|
||||
/* A simplified version of g_log_writer_default_would_drop(), to avoid
|
||||
* bumping up the required version of GLib to 2.68
|
||||
*/
|
||||
static gboolean
|
||||
would_drop (GLogLevelFlags level,
|
||||
const char *domain)
|
||||
{
|
||||
#if GLIB_CHECK_VERSION (2, 68, 0)
|
||||
return g_log_writer_default_would_drop (level, domain);
|
||||
#else
|
||||
return (level & (G_LOG_LEVEL_ERROR |
|
||||
G_LOG_LEVEL_CRITICAL |
|
||||
G_LOG_LEVEL_WARNING)) == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static GLogWriterOutput
|
||||
log_writer_func (GLogLevelFlags level,
|
||||
const GLogField *fields,
|
||||
@ -83,7 +67,7 @@ log_writer_func (GLogLevelFlags level,
|
||||
message = fields[i].value;
|
||||
}
|
||||
|
||||
if (message != NULL && !would_drop (level, domain))
|
||||
if (message != NULL && !g_log_writer_default_would_drop (level, domain))
|
||||
{
|
||||
const char *prefix;
|
||||
switch (level & G_LOG_LEVEL_MASK)
|
||||
|
Loading…
Reference in New Issue
Block a user