From 6bfd46312f96d8d67b139214e600cd2f3b2610ce Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Thu, 21 Aug 2014 12:18:32 +0000 Subject: [PATCH] Sprinkle some more const on internal arrays. STR #3110 git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10234 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Color_Chooser.cxx | 2 +- src/Fl_File_Chooser.cxx | 2 +- src/Fl_Help_View.cxx | 2 +- src/fastarrow.h | 2 +- src/mediumarrow.h | 2 +- src/print_panel.cxx | 6 +++--- src/slowarrow.h | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Fl_Color_Chooser.cxx b/src/Fl_Color_Chooser.cxx index 88a3b0461..8d5a63724 100644 --- a/src/Fl_Color_Chooser.cxx +++ b/src/Fl_Color_Chooser.cxx @@ -91,7 +91,7 @@ enum { M_HEX, /**< mode() of Fl_Color_Chooser showing hex values */ M_HSV /**< mode() of Fl_Color_Chooser showing HSV values */ }; -static Fl_Menu_Item mode_menu[] = { +static const Fl_Menu_Item mode_menu[] = { {"rgb"}, {"byte"}, {"hex"}, diff --git a/src/Fl_File_Chooser.cxx b/src/Fl_File_Chooser.cxx index de716a67e..25d46a7bb 100644 --- a/src/Fl_File_Chooser.cxx +++ b/src/Fl_File_Chooser.cxx @@ -53,7 +53,7 @@ void Fl_File_Chooser::cb_newButton(Fl_Button* o, void* v) { } #include -static unsigned char idata_new[] = +static const unsigned char idata_new[] = {0,0,120,0,132,0,2,1,1,254,1,128,49,128,49,128,253,128,253,128,49,128,49, 128,1,128,1,128,255,255,0,0}; static Fl_Bitmap image_new(idata_new, 16, 16); diff --git a/src/Fl_Help_View.cxx b/src/Fl_Help_View.cxx index ca6bacba2..aaa9b829d 100644 --- a/src/Fl_Help_View.cxx +++ b/src/Fl_Help_View.cxx @@ -97,7 +97,7 @@ static char initial_load = 0; // Broken image... // -static const char *broken_xpm[] = +static const char * const broken_xpm[] = { "16 24 4 1", "@ c #000000", diff --git a/src/fastarrow.h b/src/fastarrow.h index e381acdce..9af76ddac 100644 --- a/src/fastarrow.h +++ b/src/fastarrow.h @@ -1,6 +1,6 @@ #define fastarrow_width 16 #define fastarrow_height 16 -static unsigned char fastarrow_bits[] = { +static const unsigned char fastarrow_bits[] = { 0x00, 0x00, 0x00, 0x07, 0xe0, 0x07, 0xfc, 0x03, 0xff, 0xff, 0xfc, 0x03, 0xe0, 0x07, 0x00, 0x07, 0xe0, 0x00, 0xe0, 0x07, 0xc0, 0x3f, 0xff, 0xff, 0xc0, 0x3f, 0xe0, 0x07, 0xe0, 0x00, 0x00, 0x00}; diff --git a/src/mediumarrow.h b/src/mediumarrow.h index 8a1fe8cbc..a25f7287a 100644 --- a/src/mediumarrow.h +++ b/src/mediumarrow.h @@ -1,6 +1,6 @@ #define mediumarrow_width 16 #define mediumarrow_height 16 -static unsigned char mediumarrow_bits[] = { +static const unsigned char mediumarrow_bits[] = { 0x40, 0x00, 0x60, 0x00, 0x70, 0x00, 0x78, 0x00, 0xfc, 0x3f, 0x78, 0x00, 0x70, 0x00, 0x60, 0x02, 0x40, 0x06, 0x00, 0x0e, 0x00, 0x1e, 0xfc, 0x3f, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x06, 0x00, 0x02}; diff --git a/src/print_panel.cxx b/src/print_panel.cxx index 66ffa351d..3a4392c5b 100644 --- a/src/print_panel.cxx +++ b/src/print_panel.cxx @@ -110,7 +110,7 @@ static void cb_print_properties_panel(Fl_Double_Window*, void*) { print_update_status(); } -static Fl_Menu_Item menu_print_page_size[] = { +static const Fl_Menu_Item menu_print_page_size[] = { {"Letter", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {"A4", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {"Legal", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, @@ -124,7 +124,7 @@ static Fl_Menu_Item menu_print_page_size[] = { }; #include -static const char *idata_print_color[] = { +static const char * const idata_print_color[] = { "24 24 17 1", " \tc None", ".\tc #FFFF00", @@ -170,7 +170,7 @@ static const char *idata_print_color[] = { }; static Fl_Pixmap image_print_color(idata_print_color); -static const char *idata_print_gray[] = { +static const char * const idata_print_gray[] = { "24 24 17 1", " \tc None", ".\tc #E3E3E3", diff --git a/src/slowarrow.h b/src/slowarrow.h index 46a572c97..4ad428aca 100644 --- a/src/slowarrow.h +++ b/src/slowarrow.h @@ -1,6 +1,6 @@ #define slowarrow_width 16 #define slowarrow_height 16 -static unsigned char slowarrow_bits[] = { +static const unsigned char slowarrow_bits[] = { 0x40, 0x00, 0x40, 0x00, 0x60, 0x00, 0x60, 0x00, 0xf0, 0x0f, 0x60, 0x00, 0x60, 0x00, 0x40, 0x02, 0x40, 0x02, 0x00, 0x06, 0x00, 0x06, 0xf0, 0x0f, 0x00, 0x06, 0x00, 0x06, 0x00, 0x02, 0x00, 0x02};