[gtk+] Avoid a string copy



commit 7cd7257a079166ae56e719d4f60e027247cda617
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Sep 7 11:34:08 2015 -0400

    Avoid a string copy
    
    We have an api to create a quark from a static string, lets use it.

 gtk/gtkcssstaticstyle.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcssstaticstyle.c b/gtk/gtkcssstaticstyle.c
index ab7e76e..34563e0 100644
--- a/gtk/gtkcssstaticstyle.c
+++ b/gtk/gtkcssstaticstyle.c
@@ -149,7 +149,7 @@ gtk_css_static_style_get_default (void)
   GtkCssStyle *result;
 
   if (style_quark == 0)
-    style_quark = g_quark_from_string ("gtk-default-style");
+    style_quark = g_quark_from_static_string ("gtk-default-style");
 
   settings = gtk_settings_get_for_screen (gdk_screen_get_default ());
   result = g_object_get_qdata (G_OBJECT (settings), style_quark);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]