From 02b1646d0e48844fc1faaec17f31b46b8538579f Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sun, 5 Oct 2014 11:56:06 +0000 Subject: Make image data 'const' for all image types in fluid. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10358 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- fluid/Fluid_Image.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fluid') 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 \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 \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 \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"); -- cgit v1.2.3