From 59836fb19f45d123e0f75b47c497b97aaa7bdfbe Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sat, 2 Oct 2021 17:01:00 +0200 Subject: 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). --- FL/Fl_GIF_Image.H | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'FL') diff --git a/FL/Fl_GIF_Image.H b/FL/Fl_GIF_Image.H index 274af9a57..4871bf574 100644 --- a/FL/Fl_GIF_Image.H +++ b/FL/Fl_GIF_Image.H @@ -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: -- cgit v1.2.3