From 2bc635fa6bd301b3a9fbf7116a0ff261afb71d9c Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Wed, 6 Nov 2024 20:41:59 -0800 Subject: [PATCH] Fix -Wsign-conversion warning --- Auxiliary/DirectXTexEXR.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Auxiliary/DirectXTexEXR.cpp b/Auxiliary/DirectXTexEXR.cpp index 1de9271b..529ceaa2 100644 --- a/Auxiliary/DirectXTexEXR.cpp +++ b/Auxiliary/DirectXTexEXR.cpp @@ -220,7 +220,7 @@ HRESULT DirectX::GetMetadataFromEXRFile(const wchar_t* szFile, TexMetadata& meta const int nameLength = WideCharToMultiByte(CP_UTF8, 0, szFile, -1, nullptr, 0, nullptr, nullptr); if (nameLength > 0) { - fileName.resize(nameLength); + fileName.resize(static_cast(nameLength)); const int result = WideCharToMultiByte(CP_UTF8, 0, szFile, -1, fileName.data(), nameLength, nullptr, nullptr); if (result <= 0) { @@ -338,7 +338,7 @@ HRESULT DirectX::LoadFromEXRFile(const wchar_t* szFile, TexMetadata* metadata, S const int nameLength = WideCharToMultiByte(CP_UTF8, 0, szFile, -1, nullptr, 0, nullptr, nullptr); if (nameLength > 0) { - fileName.resize(nameLength); + fileName.resize(static_cast(nameLength)); const int result = WideCharToMultiByte(CP_UTF8, 0, szFile, -1, fileName.data(), nameLength, nullptr, nullptr); if (result <= 0) { @@ -487,7 +487,7 @@ HRESULT DirectX::SaveToEXRFile(const Image& image, const wchar_t* szFile) const int nameLength = WideCharToMultiByte(CP_UTF8, 0, szFile, -1, nullptr, 0, nullptr, nullptr); if (nameLength > 0) { - fileName.resize(nameLength); + fileName.resize(static_cast(nameLength)); const int result = WideCharToMultiByte(CP_UTF8, 0, szFile, -1, fileName.data(), nameLength, nullptr, nullptr); if (result <= 0) {