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

View File

@ -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'.

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_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) ) {