From: Vadim Zeitlin Date: Fri, 21 Sep 2007 13:57:07 +0000 (+0000) Subject: put __attribute__((deprecated)) before declaration and not after it as gcc seems... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a9dce8897e5a12a6de7f5bd12391014a9b014832 put __attribute__((deprecated)) before declaration and not after it as gcc seems to accept both and doing it like this allows to simplify wxDEPRECATED_INLINE() definition by using the same expansion for all compilers git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/defs.h b/include/wx/defs.h index 2b2b5fec49..65d3a8a726 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -516,16 +516,23 @@ typedef int wxWindowID; /* Macro to issue warning when using deprecated functions with gcc3 or MSVC7: */ #if wxCHECK_GCC_VERSION(3, 1) - #define wxDEPRECATED(x) x __attribute__ ((deprecated)) - #define wxDEPRECATED_INLINE(func, body) x { body } __attribute__ ((deprecated)) + #define wxDEPRECATED(x) __attribute__((deprecated)) x #elif defined(__VISUALC__) && (__VISUALC__ >= 1300) #define wxDEPRECATED(x) __declspec(deprecated) x - #define wxDEPRECATED_INLINE(func, body) __declspec(deprecated) x { body } #else #define wxDEPRECATED(x) x - #define wxDEPRECATED_INLINE(func, body) func { body } #endif +/* + Macro which marks the function as being deprecated but also defines it + inline. + + Currently it's defined in the same trivial way in all cases but it could + need a special definition with some other compilers in the future which + explains why do we have it. + */ +#define wxDEPRECATED_INLINE(func, body) wxDEPRECATED(func) { body } + /* Special variant of the macro above which should be used for the functions which are deprecated but called by wx itself: this often happens with