mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02:00
Add g_type_ensure() and use it rather than playing games with volatile
https://bugzilla.gnome.org/show_bug.cgi?id=605976
This commit is contained in:
10
gio/gicon.c
10
gio/gicon.c
@@ -375,12 +375,10 @@ g_icon_new_from_tokens (char **tokens,
|
||||
static void
|
||||
ensure_builtin_icon_types (void)
|
||||
{
|
||||
static volatile GType t;
|
||||
t = g_themed_icon_get_type ();
|
||||
t = g_file_icon_get_type ();
|
||||
t = g_emblemed_icon_get_type ();
|
||||
t = g_emblem_get_type ();
|
||||
(t); /* To avoid -Wunused-but-set-variable */
|
||||
g_type_ensure (G_TYPE_THEMED_ICON);
|
||||
g_type_ensure (G_TYPE_FILE_ICON);
|
||||
g_type_ensure (G_TYPE_EMBLEMED_ICON);
|
||||
g_type_ensure (G_TYPE_EMBLEM);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user