summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fluid/Fluid_Image.cxx8
-rw-r--r--src/Fl_File_Chooser.cxx1
2 files changed, 4 insertions, 5 deletions
diff --git a/fluid/Fluid_Image.cxx b/fluid/Fluid_Image.cxx
index 73d41341d..6d93d28e0 100644
--- a/fluid/Fluid_Image.cxx
+++ b/fluid/Fluid_Image.cxx
@@ -84,7 +84,7 @@ void Fluid_Image::write_static() {
write_c("#include <FL/Fl_Bitmap.H>\n");
bitmap_header_written = write_number;
}
- write_c("static unsigned char %s[] =\n",
+ write_c("static const unsigned char %s[] =\n",
unique_id(this, "idata", fl_filename_name(name()), 0));
write_cdata(img->data()[0], ((img->w() + 7) / 8) * img->h());
write_c(";\n");
@@ -99,9 +99,9 @@ void Fluid_Image::write_static() {
write_c("#include <FL/Fl_JPEG_Image.H>\n");
jpeg_header_written = write_number;
}
- write_c("static unsigned char %s[] =\n",
+ write_c("static const unsigned char %s[] =\n",
unique_id(this, "idata", fl_filename_name(name()), 0));
-
+
FILE *f = fl_fopen(name(), "rb");
if (!f) {
// message = "Can't include binary file. Can't open";
@@ -130,7 +130,7 @@ void Fluid_Image::write_static() {
write_c("#include <FL/Fl_Image.H>\n");
image_header_written = write_number;
}
- write_c("static unsigned char %s[] =\n",
+ write_c("static const unsigned char %s[] =\n",
unique_id(this, "idata", fl_filename_name(name()), 0));
write_cdata(img->data()[0], (img->w() * img->d() + img->ld()) * img->h());
write_c(";\n");
diff --git a/src/Fl_File_Chooser.cxx b/src/Fl_File_Chooser.cxx
index 9c6a03b6b..076750550 100644
--- a/src/Fl_File_Chooser.cxx
+++ b/src/Fl_File_Chooser.cxx
@@ -60,7 +60,6 @@ void Fl_File_Chooser::cb_newButton(Fl_Button* o, void* v) {
}
#include <FL/Fl_Bitmap.H>
-// FIXME: fluid does NOT (yet?) generate 'const' image data !
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};