Add wxDEPRECATED_MSG() and use it in a couple of places.

This macro should be used instead of wxDEPRECATED() for the new deprecations
as it allows to give a helpful explanatory message (if supported by the
compiler) and also is simpler to use as it doesn't require wrapping the entire
declaration in it but can be simply used before it.

Also add wxDEPRECATED() support for clang as a side effect.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-09-04 00:14:22 +00:00
parent 1c467e8804
commit 178635b62a
6 changed files with 93 additions and 20 deletions

View File

@@ -129,16 +129,16 @@ namespace wxPrivate
// backwards compatibility only.
// checks whether the passed in pointer is NULL and if the string is empty
wxDEPRECATED( inline bool IsEmpty(const char *p) );
wxDEPRECATED_MSG("use wxIsEmpty() instead")
inline bool IsEmpty(const char *p) { return (!p || !*p); }
// safe version of strlen() (returns 0 if passed NULL pointer)
wxDEPRECATED( inline size_t Strlen(const char *psz) );
wxDEPRECATED_MSG("use wxStrlen() instead")
inline size_t Strlen(const char *psz)
{ return psz ? strlen(psz) : 0; }
// portable strcasecmp/_stricmp
wxDEPRECATED( inline int Stricmp(const char *psz1, const char *psz2) );
wxDEPRECATED_MSG("use wxStricmp() instead")
inline int Stricmp(const char *psz1, const char *psz2)
{ return wxCRT_StricmpA(psz1, psz2); }