Enable suppression of "deprecated" warnings (FL_NO_DEPRECATE)
This is intended for backwards compatibility with FLTK 1.3.x code ported to 1.4.0. Users defining FL_NO_DEPRECATE can compile old (1.3.x) code w/o seeing lots of "deprecated" warnings. A legitimate use case is if old (1.3) code is intended to be used with both FLTK 1.3 and 1.4. FL_NO_DEPRECATE should NOT be defined if the user's code is targeted at 1.4.x or later. Users should fix their code to be prepared for the next minor release (e.g. 1.5.0). Todo: document this.
This commit is contained in:
parent
0078733fcb
commit
e5afb8a532
13
FL/fl_attr.h
13
FL/fl_attr.h
@ -61,6 +61,19 @@
|
||||
|
||||
#else /* FL_DOXYGEN */
|
||||
|
||||
// If FL_NO_DEPRECATED is defined FLTK 1.4 can compile 1.3.x code without
|
||||
// issuing several "deprecated" warnings (1.3 "compatibility" mode).
|
||||
// FL_DEPRECATED will be defined as a no-op.
|
||||
|
||||
// If FL_NO_DEPRECATED is not defined (default) FLTK 1.4 will issue several
|
||||
// "deprecated" warnings depending on the compiler in use: FL_DEPRECATED
|
||||
// will be defined according to the capabilities of the compiler (below).
|
||||
// The definition below this comment must match the one at the end of this file.
|
||||
|
||||
#if defined(FL_NO_DEPRECATED)
|
||||
#define FL_DEPRECATED(msg, func) func
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user