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.
This commit is contained in:
Matthias Clasen 2006-04-04 03:25:16 +00:00 committed by Matthias Clasen
parent c53db1264b
commit 8c8a4c89b8
7 changed files with 19 additions and 21 deletions

View File

@ -1,5 +1,12 @@
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.

View File

@ -1,5 +1,12 @@
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.

View File

@ -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");
}
/**

View File

@ -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");
}
/*****************************************

View File

@ -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");
}
/**

View File

@ -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");
}
/**

View File

@ -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");
}