From 51810d4d7e2d0ac1fa1eba43cebff9a4f4a73acc Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 10 Dec 2008 20:07:33 +0000 Subject: [PATCH] deprecate wxStringEq git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/utils.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/wx/utils.h b/include/wx/utils.h index 3463946de1..06b6e5b28e 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -74,8 +74,17 @@ class WXDLLIMPEXP_FWD_CORE wxWindowList; // String functions (deprecated, use wxString) // ---------------------------------------------------------------------------- +#ifdef WXWIN_COMPATIBILITY_2_8 // A shorter way of using strcmp -#define wxStringEq(s1, s2) (s1 && s2 && (wxStrcmp(s1, s2) == 0)) +wxDEPRECATED_INLINE(inline bool wxStringEq(const char *s1, const char *s2), + return wxCRT_StrcmpA(s1, s2) == 0; ) + +#if wxUSE_UNICODE +wxDEPRECATED_INLINE(inline bool wxStringEq(const wchar_t *s1, const wchar_t *s2), + return wxCRT_StrcmpW(s1, s2) == 0; ) +#endif // wxUSE_UNICODE + +#endif // WXWIN_COMPATIBILITY_2_8 // ---------------------------------------------------------------------------- // Miscellaneous functions -- 2.45.2