diff --git a/code/Common/DefaultIOSystem.cpp b/code/Common/DefaultIOSystem.cpp index ce5996fa8..c0d356689 100644 --- a/code/Common/DefaultIOSystem.cpp +++ b/code/Common/DefaultIOSystem.cpp @@ -64,18 +64,18 @@ using namespace Assimp; #ifdef _WIN32 static std::wstring Utf8ToWide(const char* in) { - size_t size = MultiByteToWideChar(CP_UTF8, 0, in, -1, nullptr, 0); + int size = MultiByteToWideChar(CP_UTF8, 0, in, -1, nullptr, 0); // size includes terminating null; std::wstring adds null automatically - std::wstring out(size - 1, L'\0'); + std::wstring out(static_cast(size) - 1, L'\0'); MultiByteToWideChar(CP_UTF8, 0, in, -1, &out[0], size); return out; } static std::string WideToUtf8(const wchar_t* in) { - size_t size = WideCharToMultiByte(CP_UTF8, 0, in, -1, nullptr, 0, nullptr, nullptr); + int size = WideCharToMultiByte(CP_UTF8, 0, in, -1, nullptr, 0, nullptr, nullptr); // size includes terminating null; std::string adds null automatically - std::string out(size - 1, '\0'); + std::string out(static_cast(size) - 1, '\0'); WideCharToMultiByte(CP_UTF8, 0, in, -1, &out[0], size, nullptr, nullptr); return out; }