Commit 8c8a4c89 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

No point in making the error path fast by caching quarks.

2006-04-03  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkrecentchooser.c (gtk_recent_chooser_error_quark):
        * gtk/gtkrecentmanager.c (gtk_recent_manager_error_quark):
        * gtk/gtkfilechooser.c (gtk_file_chooser_error_quark):
        * gtk/gtkfilesystem.c (gtk_file_system_error_quark):
        * gtk/gtkicontheme.c (gtk_icon_theme_error_quark): No point
        in making the error path fast by caching quarks.
parent c53db126
2006-04-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkrecentchooser.c (gtk_recent_chooser_error_quark):
* gtk/gtkrecentmanager.c (gtk_recent_manager_error_quark):
* gtk/gtkfilechooser.c (gtk_file_chooser_error_quark):
* gtk/gtkfilesystem.c (gtk_file_system_error_quark):
* gtk/gtkicontheme.c (gtk_icon_theme_error_quark): No point
in making the error path fast by caching quarks.
* gtk/gtkfilesel.c (no_stat_dirs): Avoid relocation.
* gdk/gdk.c: Here too.
......
2006-04-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkrecentchooser.c (gtk_recent_chooser_error_quark):
* gtk/gtkrecentmanager.c (gtk_recent_manager_error_quark):
* gtk/gtkfilechooser.c (gtk_file_chooser_error_quark):
* gtk/gtkfilesystem.c (gtk_file_system_error_quark):
* gtk/gtkicontheme.c (gtk_icon_theme_error_quark): No point
in making the error path fast by caching quarks.
* gtk/gtkfilesel.c (no_stat_dirs): Avoid relocation.
* gdk/gdk.c: Here too.
......
......@@ -292,10 +292,7 @@ gtk_file_chooser_class_init (gpointer g_iface)
GQuark
gtk_file_chooser_error_quark (void)
{
static GQuark quark = 0;
if (quark == 0)
quark = g_quark_from_static_string ("gtk-file-chooser-error-quark");
return quark;
return g_quark_from_static_string ("gtk-file-chooser-error-quark");
}
/**
......
......@@ -45,10 +45,7 @@ static void gtk_file_folder_base_init (gpointer g_class);
GQuark
gtk_file_system_error_quark (void)
{
static GQuark quark = 0;
if (quark == 0)
quark = g_quark_from_static_string ("gtk-file-system-error-quark");
return quark;
return g_quark_from_static_string ("gtk-file-system-error-quark");
}
/*****************************************
......
......@@ -1342,11 +1342,7 @@ gtk_icon_theme_lookup_icon (GtkIconTheme *icon_theme,
GQuark
gtk_icon_theme_error_quark (void)
{
static GQuark q = 0;
if (q == 0)
q = g_quark_from_static_string ("gtk-icon-theme-error-quark");
return q;
return g_quark_from_static_string ("gtk-icon-theme-error-quark");
}
/**
......
......@@ -181,10 +181,7 @@ gtk_recent_chooser_class_init (gpointer g_iface)
GQuark
gtk_recent_chooser_error_quark (void)
{
static GQuark error_quark = 0;
if (!error_quark)
error_quark = g_quark_from_static_string ("gtk-recent-chooser-error-quark");
return error_quark;
return g_quark_from_static_string ("gtk-recent-chooser-error-quark");
}
/**
......
......@@ -163,10 +163,7 @@ filename_warning (const char *format, const char *filename, const char *message)
GQuark
gtk_recent_manager_error_quark (void)
{
static GQuark quark = 0;
if (quark == 0)
quark = g_quark_from_static_string ("gtk-recent-manager-error-quark");
return quark;
return g_quark_from_static_string ("gtk-recent-manager-error-quark");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment