diff --git a/DirectXMesh/DirectXMeshP.h b/DirectXMesh/DirectXMeshP.h index 24b96d7..086298c 100644 --- a/DirectXMesh/DirectXMeshP.h +++ b/DirectXMesh/DirectXMeshP.h @@ -119,6 +119,7 @@ #include #include #include +#include #include #include diff --git a/DirectXMesh/scoped.h b/DirectXMesh/scoped.h index 20dd23d..d8f768c 100644 --- a/DirectXMesh/scoped.h +++ b/DirectXMesh/scoped.h @@ -13,6 +13,7 @@ #include #include #include +#include #ifndef WIN32 #include @@ -98,7 +99,7 @@ public: { FILE_DISPOSITION_INFO info = {}; info.DeleteFile = TRUE; - (void)SetFileInformationByHandle(m_handle, FileDispositionInfo, &info, sizeof(info)); + std::ignore = SetFileInformationByHandle(m_handle, FileDispositionInfo, &info, sizeof(info)); } } diff --git a/Meshconvert/Meshconvert.cpp b/Meshconvert/Meshconvert.cpp index 02ec6d0..97d8632 100644 --- a/Meshconvert/Meshconvert.cpp +++ b/Meshconvert/Meshconvert.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include "Mesh.h" @@ -685,6 +686,8 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[]) return 1; } + inFile.imbue(std::locale::classic()); + ProcessFileList(inFile, conversion); } break; @@ -1007,7 +1010,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[]) if (dwOptions & (1 << OPT_TOLOWER)) { - (void)_wcslwr_s(outputPath); + std::ignore = _wcslwr_s(outputPath); } if (~dwOptions & (1 << OPT_OVERWRITE)) diff --git a/Utilities/WaveFrontReader.h b/Utilities/WaveFrontReader.h index 4cb7787..64290df 100644 --- a/Utilities/WaveFrontReader.h +++ b/Utilities/WaveFrontReader.h @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -66,7 +67,7 @@ public: { Clear(); - static const size_t MAX_POLY = 64; + constexpr size_t MAX_POLY = 64; using namespace DirectX; @@ -74,6 +75,8 @@ public: if (!InFile) return /* HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) */ static_cast(0x80070002L); + InFile.imbue(std::locale::classic()); + #ifdef WIN32 wchar_t fname[_MAX_FNAME] = {}; _wsplitpath_s(szFileName, nullptr, 0, nullptr, 0, fname, _MAX_FNAME, nullptr, 0); @@ -417,6 +420,8 @@ public: if (!InFile) return /* HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) */ static_cast(0x80070002L); + InFile.imbue(std::locale::classic()); + auto curMaterial = materials.end(); for (;; )