@@ -220,7 +220,7 @@ HRESULT DirectX::GetMetadataFromEXRFile(const wchar_t* szFile, TexMetadata& meta
220
220
const int nameLength = WideCharToMultiByte (CP_UTF8, 0 , szFile, -1 , nullptr , 0 , nullptr , nullptr );
221
221
if (nameLength > 0 )
222
222
{
223
- fileName.resize (nameLength);
223
+ fileName.resize (static_cast < size_t >( nameLength) );
224
224
const int result = WideCharToMultiByte (CP_UTF8, 0 , szFile, -1 , fileName.data (), nameLength, nullptr , nullptr );
225
225
if (result <= 0 )
226
226
{
@@ -338,7 +338,7 @@ HRESULT DirectX::LoadFromEXRFile(const wchar_t* szFile, TexMetadata* metadata, S
338
338
const int nameLength = WideCharToMultiByte (CP_UTF8, 0 , szFile, -1 , nullptr , 0 , nullptr , nullptr );
339
339
if (nameLength > 0 )
340
340
{
341
- fileName.resize (nameLength);
341
+ fileName.resize (static_cast < size_t >( nameLength) );
342
342
const int result = WideCharToMultiByte (CP_UTF8, 0 , szFile, -1 , fileName.data (), nameLength, nullptr , nullptr );
343
343
if (result <= 0 )
344
344
{
@@ -487,7 +487,7 @@ HRESULT DirectX::SaveToEXRFile(const Image& image, const wchar_t* szFile)
487
487
const int nameLength = WideCharToMultiByte (CP_UTF8, 0 , szFile, -1 , nullptr , 0 , nullptr , nullptr );
488
488
if (nameLength > 0 )
489
489
{
490
- fileName.resize (nameLength);
490
+ fileName.resize (static_cast < size_t >( nameLength) );
491
491
const int result = WideCharToMultiByte (CP_UTF8, 0 , szFile, -1 , fileName.data (), nameLength, nullptr , nullptr );
492
492
if (result <= 0 )
493
493
{
0 commit comments