diff --git a/include/wx/string.h b/include/wx/string.h index ce69cb8026..91f25b154e 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -1351,7 +1351,7 @@ public: const wxWX2MBbuf mbc_str() const { return mb_str(*wxConvCurrent); } #if wxUSE_UNICODE_WCHAR - const wxChar* wc_str() const { return wx_str(); } + const wchar_t* wc_str() const { return wx_str(); } #elif wxUSE_UNICODE_UTF8 const wxWCharBuffer wc_str() const; #endif @@ -1369,7 +1369,7 @@ public: const wxChar* mb_str() const { return wx_str(); } // for compatibility with wxUSE_UNICODE version - const wxChar* mb_str(const wxMBConv& WXUNUSED(conv)) const { return wx_str(); } + const char* mb_str(const wxMBConv& WXUNUSED(conv)) const { return wx_str(); } const wxWX2MBbuf mbc_str() const { return mb_str(); } @@ -1379,6 +1379,15 @@ public: const wxCharBuffer fn_str() const { return wxConvFile.cWC2WX( wc_str( wxConvLibc ) ); } #endif // Unicode/ANSI +#if wxUSE_UNICODE_UTF8 + const wxWCharBuffer t_str() const { return wc_str(); } +#elif wxUSE_UNICODE_WCHAR + const wchar_t* t_str() const { return wx_str(); } +#else + const char* t_str() const { return wx_str(); } +#endif + + // overloaded assignment // from another wxString wxString& operator=(const wxString& stringSrc) diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index f5389f2991..b9053ba8ac 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -1851,7 +1851,7 @@ static bool wxCheckWin32Permission(const wxString& path, DWORD access) HANDLE h = ::CreateFile ( - path.c_str(), + path.t_str(), access, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL,