From e9b1c2fed092c9952464cc7999bf4a5c27ab250b Mon Sep 17 00:00:00 2001 From: YX Date: Sat, 26 Mar 2022 14:29:32 +0800 Subject: [PATCH] Add `const` to Fl_Image::fail() (PR #415) --- FL/Fl_Image.H | 2 +- src/Fl_Image.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/FL/Fl_Image.H b/FL/Fl_Image.H index 690239b65..a32b29c4a 100644 --- a/FL/Fl_Image.H +++ b/FL/Fl_Image.H @@ -187,7 +187,7 @@ public: \see count(), w(), h(), data_w(), data_h(), d(), ld() */ const char * const *data() const {return data_;} - int fail(); + int fail() const; /** Releases an Fl_Image - the same as '\p delete \p this'. diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx index 69c9727ab..2acca2bcb 100644 --- a/src/Fl_Image.cxx +++ b/src/Fl_Image.cxx @@ -175,7 +175,7 @@ void Fl_Image::label(Fl_Menu_Item* m) { \return ERR_FILE_ACCESS if there was a file access related error (errno should be set) \return ERR_FORMAT if image decoding failed. */ -int Fl_Image::fail() +int Fl_Image::fail() const { // if no image exists, ld_ may contain a simple error code if ( (w_<=0) || (h_<=0) || (d_<=0) ) {