Separate Fl_GIF_Image constructors with and w/o length arg

Document clearly that reading from memory w/o the length argument
(old constructor) is discouraged (deprecated).
This commit is contained in:
Albrecht Schlosser
2021-10-02 17:01:00 +02:00
parent 01ea77ed88
commit 59836fb19f
2 changed files with 45 additions and 15 deletions
+4 -1
View File
@@ -31,7 +31,10 @@ class FL_EXPORT Fl_GIF_Image : public Fl_Pixmap {
public:
Fl_GIF_Image(const char* filename);
Fl_GIF_Image(const char* imagename, const unsigned char *data, const long length = -1);
// deprecated constructor w/o length (for backwards compatibility)
Fl_GIF_Image(const char* imagename, const unsigned char *data);
// constructor with length (since 1.4.0)
Fl_GIF_Image(const char* imagename, const unsigned char *data, const size_t length);
protected: