X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/febd3dcaf881ca5654a1331196686b5a4e948402..850e47aa3c20c22ff650e80e92e7795a66431863:/interface/wx/defs.h diff --git a/interface/wx/defs.h b/interface/wx/defs.h index cb756d8ca2..2b2afd8f16 100644 --- a/interface/wx/defs.h +++ b/interface/wx/defs.h @@ -1119,6 +1119,29 @@ template wxDELETEA(T*& array); */ #define wxDEPRECATED_INLINE(func, body) +/** + A helper macro allowing to easily define a simple deprecated accessor. + + Compared to wxDEPRECATED_INLINE() it saves a @c return statement and, + especially, a strangely looking semicolon inside a macro. + + Example of use + @code + class wxFoo + { + public: + int GetValue() const { return m_value; } + + // this one is deprecated because it was erroneously non-const + wxDEPRECATED_ACCESSOR( int GetValue(), m_value ) + + private: + int m_value; + }; + @endcode + */ +#define wxDEPRECATED_ACCESSOR(func, what) + /** Combination of wxDEPRECATED_BUT_USED_INTERNALLY() and wxDEPRECATED_INLINE().