summaryrefslogtreecommitdiff
path: root/src/Fl_Shared_Image.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2022-03-20 19:59:22 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2022-04-13 16:50:30 +0200
commit10537b7143a06a4c0c1c4caba4f0150f9e290090 (patch)
treed265896f0d66a20391cbeb55b0f133fb3f1a90ca /src/Fl_Shared_Image.cxx
parent95b5623b96e37e46ef80e75326453ea840172ce7 (diff)
Make Fl_Image::copy() 'const', including all derived classes
Copying an image does not (and must not) change the original object, hence copy() should always be 'const'. This is *necessary* if the given Fl_Image object is 'const'.
Diffstat (limited to 'src/Fl_Shared_Image.cxx')
-rw-r--r--src/Fl_Shared_Image.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Fl_Shared_Image.cxx b/src/Fl_Shared_Image.cxx
index 8b3a34ded..91e093b6f 100644
--- a/src/Fl_Shared_Image.cxx
+++ b/src/Fl_Shared_Image.cxx
@@ -300,7 +300,7 @@ void Fl_Shared_Image::reload() {
// For doxygen docs see Fl_Image::copy().
Fl_Image *
-Fl_Shared_Image::copy(int W, int H) {
+Fl_Shared_Image::copy(int W, int H) const {
Fl_Image *temp_image; // New image file
Fl_Shared_Image *temp_shared; // New shared image