From 531cfed2d1e25eb76f7017318cc10eabe76e4f82 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 26 Feb 2009 16:10:50 +0000 Subject: [PATCH] added wxDEPRECATED_BUT_USED_INTERNALLY_INLINE git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59163 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/defs.h | 11 +++++++++++ interface/wx/defs.h | 13 ++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/include/wx/defs.h b/include/wx/defs.h index 51c395bb7a..1fdea42202 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -530,6 +530,17 @@ typedef short int WXTYPE; # define wxDEPRECATED_BUT_USED_INTERNALLY(x) wxDEPRECATED(x) #endif +/* + Combination of the two variants above: should be used for deprecated + functions which are defined inline and are used by wxWidgets itself. + */ +#ifdef WXBUILDING +# define wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(func, body) func { body } +#else +# define wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(func, body) \ + wxDEPRECATED(func) { body } +#endif + /* everybody gets the assert and other debug macros */ #include "wx/debug.h" diff --git a/interface/wx/defs.h b/interface/wx/defs.h index 63e815802b..1640d7b3bd 100644 --- a/interface/wx/defs.h +++ b/interface/wx/defs.h @@ -1065,7 +1065,7 @@ template wxDELETEA(T*& array); public: // OldMethod() is deprecated, use NewMethod() instead void NewMethod(); - wxDEPRECATED_INLINE( void OldMethod(), NewMethod() ); + wxDEPRECATED_INLINE( void OldMethod(), NewMethod(); ) }; @endcode @@ -1073,6 +1073,17 @@ template wxDELETEA(T*& array); */ #define wxDEPRECATED_INLINE(func, body) +/** + Combination of wxDEPRECATED_BUT_USED_INTERNALLY() and wxDEPRECATED_INLINE(). + + This macro should be used for deprecated functions called by the library + itself (usually for backwards compatibility reasons) and which are defined + inline. + + @header{wx/defs.h} +*/ +#define wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(func, body) + /** @c wxEXPLICIT is a macro which expands to the C++ @c explicit keyword if the compiler supports it or nothing otherwise. Thus, it can be used even in -- 2.45.2