summaryrefslogtreecommitdiff
path: root/src/KM_fileio.cpp
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-02-03 09:16:05 +0000
committerCarl Hetherington <cth@carlh.net>2016-02-03 09:16:05 +0000
commit8f7ae26a12d108a1fb777392bc546114cbe24cf9 (patch)
tree582d4de1b89678f80ff56a319f0ca9798a8c5822 /src/KM_fileio.cpp
parenteae4ef1dea28868dd61dab68a37b7ee6d1181036 (diff)
Win32 build fixes.
Diffstat (limited to 'src/KM_fileio.cpp')
-rw-r--r--src/KM_fileio.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/KM_fileio.cpp b/src/KM_fileio.cpp
index e7b1e73..7754c66 100644
--- a/src/KM_fileio.cpp
+++ b/src/KM_fileio.cpp
@@ -804,9 +804,9 @@ Kumu::FileReader::OpenRead(const std::string& filename) const
// suppress popup window on error
UINT prev = ::SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX);
- int const wn = MultiByteToWideChar (CP_UTF8, 0, filename, -1, 0, 0);
+ int const wn = MultiByteToWideChar (CP_UTF8, 0, filename.c_str(), -1, 0, 0);
wchar_t* buffer = new wchar_t[wn];
- if (MultiByteToWideChar (CP_UTF8, 0, filename, -1, buffer, wn) == 0)
+ if (MultiByteToWideChar (CP_UTF8, 0, filename.c_str(), -1, buffer, wn) == 0)
{
delete[] buffer;
return Kumu::RESULT_FAIL;
@@ -937,9 +937,9 @@ Kumu::FileWriter::OpenWrite(const std::string& filename)
// suppress popup window on error
UINT prev = ::SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX);
- int const wn = MultiByteToWideChar (CP_UTF8, 0, filename, -1, 0, 0);
+ int const wn = MultiByteToWideChar (CP_UTF8, 0, filename.c_str(), -1, 0, 0);
wchar_t* buffer = new wchar_t[wn];
- if (MultiByteToWideChar (CP_UTF8, 0, filename, -1, buffer, wn) == 0)
+ if (MultiByteToWideChar (CP_UTF8, 0, filename.c_str(), -1, buffer, wn) == 0)
{
delete[] buffer;
return Kumu::RESULT_FAIL;