[master] 66c0bf4 - Make Fl_Image_Reader::name() 'const' (#271)

GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 66c0bf4 - Make Fl_Image_Reader::name() 'const' (#271) "Albrecht Schlosser" 07:17 Sep 28 top right image
 
commit 66c0bf4811abc3502d7fe1900289908c590b5cfb
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Tue Sep 28 16:07:49 2021 +0200
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Tue Sep 28 16:07:49 2021 +0200

    Make Fl_Image_Reader::name() 'const' (#271)
    
    Thanks to @wcout for finding this.

 src/Fl_Image_Reader.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git src/Fl_Image_Reader.h src/Fl_Image_Reader.h
index 2c62e4a..e9b2937 100644
--- src/Fl_Image_Reader.h
+++ src/Fl_Image_Reader.h
@@ -80,7 +80,7 @@ public:
   }
 
   // return the name or filename for this reader
-  const char *name() { return pName; }
+  const char *name() const { return pName; }
 
   // skip a given number of bytes
   void skip(unsigned int n) { seek(tell() + n); }
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2021 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.