From: Vadim Zeitlin Date: Mon, 30 Nov 2009 00:30:08 +0000 (+0000) Subject: Fix compilation in wxUSE_STL==1 case broken by r62738. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5fc0c309f74f73279c6fb670d2c8a6e0d6883ae5 Fix compilation in wxUSE_STL==1 case broken by r62738. We need to use wxString::c_str() explicitly to convert wxString to const char * in STL build. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/wxcrt.h b/include/wx/wxcrt.h index a348b14711..b0dffa4adc 100644 --- a/include/wx/wxcrt.h +++ b/include/wx/wxcrt.h @@ -656,13 +656,13 @@ inline const char* wxStrchr(const wxString& s, int c) inline const char* wxStrrchr(const wxString& s, int c) { return wxCRT_StrrchrA((const char*)s.c_str(), c); } inline const char* wxStrchr(const wxString& s, const wxUniChar& uc) - { char c; return uc.GetAsChar(&c) ? wxCRT_StrchrA(s, c) : NULL; } + { char c; return uc.GetAsChar(&c) ? wxCRT_StrchrA(s.c_str(), c) : NULL; } inline const char* wxStrrchr(const wxString& s, const wxUniChar& uc) - { char c; return uc.GetAsChar(&c) ? wxCRT_StrrchrA(s, c) : NULL; } + { char c; return uc.GetAsChar(&c) ? wxCRT_StrrchrA(s.c_str(), c) : NULL; } inline const char* wxStrchr(const wxString& s, const wxUniCharRef& uc) - { char c; return uc.GetAsChar(&c) ? wxCRT_StrchrA(s, c) : NULL; } + { char c; return uc.GetAsChar(&c) ? wxCRT_StrchrA(s.c_str(), c) : NULL; } inline const char* wxStrrchr(const wxString& s, const wxUniCharRef& uc) - { char c; return uc.GetAsChar(&c) ? wxCRT_StrrchrA(s, c) : NULL; } + { char c; return uc.GetAsChar(&c) ? wxCRT_StrrchrA(s.c_str(), c) : NULL; } inline const wchar_t* wxStrchr(const wxString& s, wchar_t c) { return wxCRT_StrchrW((const wchar_t*)s.c_str(), c); } inline const wchar_t* wxStrrchr(const wxString& s, wchar_t c)