debug: optimize wp_log_level_is_enabled()

Add the 'const' attribute to let the compiler know that it doesn't
need to call it multiple times for the same debug level argument,
since the enabled log levels cannot change at runtime.
This commit is contained in:
George Kiagiadakis 2020-04-27 10:57:59 +03:00
parent 1faa752cd0
commit 2c1df41a16

View file

@ -20,7 +20,7 @@ G_BEGIN_DECLS
#define WP_OBJECT_ARGS(object) G_OBJECT_TYPE_NAME(object), object
WP_API
gboolean wp_log_level_is_enabled (GLogLevelFlags log_level);
gboolean wp_log_level_is_enabled (GLogLevelFlags log_level) G_GNUC_CONST;
WP_API
GLogWriterOutput wp_log_writer_default (GLogLevelFlags log_level,