added wxString.t_str() and used it in filefn.cpp

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2008-07-04 07:56:32 +00:00
parent c6867dcd51
commit 6ad68ad8c8
2 changed files with 12 additions and 3 deletions

View File

@@ -1351,7 +1351,7 @@ public:
const wxWX2MBbuf mbc_str() const { return mb_str(*wxConvCurrent); } const wxWX2MBbuf mbc_str() const { return mb_str(*wxConvCurrent); }
#if wxUSE_UNICODE_WCHAR #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 #elif wxUSE_UNICODE_UTF8
const wxWCharBuffer wc_str() const; const wxWCharBuffer wc_str() const;
#endif #endif
@@ -1369,7 +1369,7 @@ public:
const wxChar* mb_str() const { return wx_str(); } const wxChar* mb_str() const { return wx_str(); }
// for compatibility with wxUSE_UNICODE version // 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(); } const wxWX2MBbuf mbc_str() const { return mb_str(); }
@@ -1379,6 +1379,15 @@ public:
const wxCharBuffer fn_str() const { return wxConvFile.cWC2WX( wc_str( wxConvLibc ) ); } const wxCharBuffer fn_str() const { return wxConvFile.cWC2WX( wc_str( wxConvLibc ) ); }
#endif // Unicode/ANSI #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 // overloaded assignment
// from another wxString // from another wxString
wxString& operator=(const wxString& stringSrc) wxString& operator=(const wxString& stringSrc)

View File

@@ -1851,7 +1851,7 @@ static bool wxCheckWin32Permission(const wxString& path, DWORD access)
HANDLE h = ::CreateFile HANDLE h = ::CreateFile
( (
path.c_str(), path.t_str(),
access, access,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
NULL, NULL,