Use wc_str for Windows only code

This fixes the build for wxWidgets 3.0. The paths are Windows specific,
so c_str and WX_STR already evaluate to a wide string in wxWidgets 2.8.
This commit is contained in:
Jonathan Li 2015-06-12 18:11:43 +01:00
parent 2a7d7b54d3
commit 283d4fa57c
3 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@
// Maybe some day we'll convert all file related ops to wxWidgets, which means also the
// instances at zlib_indexed.h (which use plain stdio FILE*)
#ifdef WIN32
# define PX_wfilename(name_wxstr) (WX_STR(name_wxstr))
# define PX_wfilename(name_wxstr) (name_wxstr.wc_str())
# define PX_fopen_rb(name_wxstr) (_wfopen(PX_wfilename(name_wxstr), L"rb"))
#else
# define PX_wfilename(name_wxstr) (name_wxstr.mbc_str())

View File

@ -216,7 +216,7 @@ static void MapUnknownSource( uint Eip )
return;
}
Module tmp((sz==0) ? modulenam.c_str() : NULL, (void*)Eip);
Module tmp((sz==0) ? modulenam.wc_str() : NULL, (void*)Eip);
tmp.ticks++;
ProfUnknownHash.insert(MapType::value_type(modulenam, tmp));

View File

@ -297,7 +297,7 @@ private:
tSel=-1;
for(int i=0;i<ndevs;i++)
{
SendMessage(GetDlgItem(hWnd,IDC_DS_DEVICE),CB_ADDSTRING,0,(LPARAM)m_devices[i].name.c_str());
SendMessage(GetDlgItem(hWnd,IDC_DS_DEVICE),CB_ADDSTRING,0,(LPARAM)m_devices[i].name.wc_str());
if(haveGuid && IsEqualGUID(m_devices[i].guid,DevGuid) || tSel < 0 && !m_devices[i].hasGuid)
tSel = i;
}