Skip to content

Commit

Permalink
Fix -Wsign-conversion warning
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Nov 7, 2024
1 parent 2f37de7 commit 2bc635f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Auxiliary/DirectXTexEXR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<size_t>(nameLength));
const int result = WideCharToMultiByte(CP_UTF8, 0, szFile, -1, fileName.data(), nameLength, nullptr, nullptr);
if (result <= 0)
{
Expand Down Expand Up @@ -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<size_t>(nameLength));
const int result = WideCharToMultiByte(CP_UTF8, 0, szFile, -1, fileName.data(), nameLength, nullptr, nullptr);
if (result <= 0)
{
Expand Down Expand Up @@ -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<size_t>(nameLength));
const int result = WideCharToMultiByte(CP_UTF8, 0, szFile, -1, fileName.data(), nameLength, nullptr, nullptr);
if (result <= 0)
{
Expand Down

0 comments on commit 2bc635f

Please sign in to comment.