From d75c9b05c86feb499326ecc2b40a3f564d946a73 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 23 Apr 2007 00:43:19 +0000 Subject: [PATCH] define wxGetTranslation() as (trivial) inline function, not macro, in wxUSE_INTL==0 case to allow compilation of the code using its second domain argument (fixes bug 1692898) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/intl.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/include/wx/intl.h b/include/wx/intl.h index 471d9ad9ba..15319eb79a 100644 --- a/include/wx/intl.h +++ b/include/wx/intl.h @@ -562,7 +562,8 @@ private: extern WXDLLIMPEXP_BASE wxLocale* wxGetLocale(); // get the translation of the string in the current locale -inline const wxChar *wxGetTranslation(const wxChar *sz, const wxChar* domain=NULL) +inline const wxChar * +wxGetTranslation(const wxChar *sz, const wxChar* domain = NULL) { wxLocale *pLoc = wxGetLocale(); if (pLoc) @@ -570,8 +571,11 @@ inline const wxChar *wxGetTranslation(const wxChar *sz, const wxChar* domain=NUL else return sz; } -inline const wxChar *wxGetTranslation(const wxChar *sz1, const wxChar *sz2, - size_t n, const wxChar* domain=NULL) + +inline const wxChar * +wxGetTranslation(const wxChar *sz1, const wxChar *sz2, + size_t n, + const wxChar *domain = NULL) { wxLocale *pLoc = wxGetLocale(); if (pLoc) @@ -588,13 +592,16 @@ inline const wxChar *wxGetTranslation(const wxChar *sz1, const wxChar *sz2, #if !defined(_) #define _(s) (_T(s)) #endif + #define wxPLURAL(sing, plur, n) ((n) == 1 ? (sing) : (plur)) #endif #define wxTRANSLATE(str) _T(str) -// Note: use of 'inline' here can cause this symbol not to be found when compiled with gcc -//const wxChar *wxGetTranslation(const wxChar *sz); -#define wxGetTranslation(sz) (sz) +inline const wxChar * +wxGetTranslation(const wxChar *sz, const wxChar * WXUNUSED(domain) = NULL) +{ + return sz; +} #endif // wxUSE_INTL/!wxUSE_INTL