mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-04-23 14:39:56 +08:00
fix build error on C++11/C++14
This commit is contained in:
parent
fb256609f2
commit
05a4456948
@ -2211,7 +2211,7 @@ void TinyGLTF::SetFsCallbacks(FsCallbacks callbacks) { fs = callbacks; }
|
|||||||
static inline std::wstring UTF8ToWchar(const std::string &str) {
|
static inline std::wstring UTF8ToWchar(const std::string &str) {
|
||||||
int wstr_size = MultiByteToWideChar(CP_UTF8, 0, str.data(), (int)str.size(), nullptr, 0);
|
int wstr_size = MultiByteToWideChar(CP_UTF8, 0, str.data(), (int)str.size(), nullptr, 0);
|
||||||
std::wstring wstr(wstr_size, 0);
|
std::wstring wstr(wstr_size, 0);
|
||||||
MultiByteToWideChar(CP_UTF8, 0, str.data(), (int)str.size(), wstr.data(), (int)wstr.size());
|
MultiByteToWideChar(CP_UTF8, 0, str.data(), (int)str.size(), &wstr[0], (int)wstr.size());
|
||||||
return wstr;
|
return wstr;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user