diff options
author | Bill Meier <wmeier@newsguy.com> | 2013-07-01 14:32:08 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2013-07-01 14:32:08 +0000 |
commit | 43442af8e3d31ed5561e0d1120f6350bc6261c51 (patch) | |
tree | c9d2eb023accf7f26a46ed931124e2a1d21ae804 /ui/gtk/prefs_font_color.c | |
parent | ee52f06db9de9cc4533ca279caa2eb1f67fff93e (diff) | |
download | wireshark-43442af8e3d31ed5561e0d1120f6350bc6261c51.tar.gz |
Define certain 'const char *...' arrays as static.
(That is: Don't create the array on the stack each time
the function is called).
Reduces code memory usage and execution time.
(See SVN #50271)
svn path=/trunk/; revision=50295
Diffstat (limited to 'ui/gtk/prefs_font_color.c')
-rw-r--r-- | ui/gtk/prefs_font_color.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/ui/gtk/prefs_font_color.c b/ui/gtk/prefs_font_color.c index ade3806aba..9cfbc80a62 100644 --- a/ui/gtk/prefs_font_color.c +++ b/ui/gtk/prefs_font_color.c @@ -132,18 +132,18 @@ font_color_prefs_show(void) { GtkWidget *main_vb, *main_grid, *label, *combo_box; GtkWidget *font_sample, *color_sample, *colorsel; - const gchar *mt[] = { - "Marked packet foreground", /* MFG_IDX 0*/ - "Marked packet background", /* MBG_IDX 1*/ - "Ignored packet foreground", /* IFG_IDX 2*/ - "Ignored packet background", /* IBG_IDX 3*/ - "'Follow Stream' client foreground", /* CFG_IDX 4*/ - "'Follow Stream' client background", /* CBG_IDX 5*/ - "'Follow Stream' server foreground", /* SFG_IDX 6*/ - "'Follow Stream' server background", /* SBG_IDX 7*/ - "Valid filter text entry", /* FTV_IDX 8*/ - "Invalid filter text entry", /* FTI_IDX 9*/ - "Deprecated filter text entry" /* FTD_IDX 10*/ + static const gchar *mt[] = { + "Marked packet foreground", /* MFG_IDX 0*/ + "Marked packet background", /* MBG_IDX 1*/ + "Ignored packet foreground", /* IFG_IDX 2*/ + "Ignored packet background", /* IBG_IDX 3*/ + "'Follow Stream' client foreground", /* CFG_IDX 4*/ + "'Follow Stream' client background", /* CBG_IDX 5*/ + "'Follow Stream' server foreground", /* SFG_IDX 6*/ + "'Follow Stream' server background", /* SBG_IDX 7*/ + "Valid filter text entry", /* FTV_IDX 8*/ + "Invalid filter text entry", /* FTI_IDX 9*/ + "Deprecated filter text entry" /* FTD_IDX 10*/ }; int mcount = sizeof(mt) / sizeof (gchar *); GtkTextBuffer *buf; |