Use nullptr instead of NULL.
diff --git a/tiny_gltf.h b/tiny_gltf.h
index 108c8e1..708ca02 100644
--- a/tiny_gltf.h
+++ b/tiny_gltf.h
@@ -2543,15 +2543,16 @@
std::string ExpandFilePath(const std::string &filepath, void *) {
#ifdef _WIN32
+ // Assume input `filepath` is encoded in UTF-8
std::wstring wfilepath = UTF8ToWchar(filepath);
- DWORD wlen = ExpandEnvironmentStringsW(wfilepath.c_str(), NULL, 0);
+ DWORD wlen = ExpandEnvironmentStringsW(wfilepath.c_str(), nullptr, 0);
wchar_t *wstr = new wchar_t[wlen];
ExpandEnvironmentStringsW(wfilepath.c_str(), wstr, wlen);
std::wstring ws(wstr);
delete[] wstr;
return WcharToUTF8(ws);
-
+
#else
#if defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR) || \