Add const to Fl_Image::fail() (PR #415)

This commit is contained in:
YX
2022-03-26 14:29:32 +08:00
committed by Albrecht Schlosser
parent fc250a3aa2
commit e9b1c2fed0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -187,7 +187,7 @@ public:
\see count(), w(), h(), data_w(), data_h(), d(), ld() \see count(), w(), h(), data_w(), data_h(), d(), ld()
*/ */
const char * const *data() const {return data_;} const char * const *data() const {return data_;}
int fail(); int fail() const;
/** /**
Releases an Fl_Image - the same as '\p delete \p this'. Releases an Fl_Image - the same as '\p delete \p this'.
+1 -1
View File
@@ -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_FILE_ACCESS if there was a file access related error (errno should be set)
\return ERR_FORMAT if image decoding failed. \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 no image exists, ld_ may contain a simple error code
if ( (w_<=0) || (h_<=0) || (d_<=0) ) { if ( (w_<=0) || (h_<=0) || (d_<=0) ) {