From 7186bb78903e32c09fe87dc3abbd96dcaf82a78d Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Tue, 17 Mar 2020 14:18:03 -0700 Subject: [PATCH] Minor code review --- DDSView/ddsview.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DDSView/ddsview.cpp b/DDSView/ddsview.cpp index d8e6946..8237870 100644 --- a/DDSView/ddsview.cpp +++ b/DDSView/ddsview.cpp @@ -119,7 +119,7 @@ int WINAPI wWinMain( _In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, if ( FAILED(hr) ) { wchar_t buff[2048] = {}; - swprintf_s( buff, L"Failed to open texture file\n\nFilename = %ls\nHRESULT %08X", lpCmdLine, hr ); + swprintf_s( buff, L"Failed to open texture file\n\nFilename = %ls\nHRESULT %08X", lpCmdLine, static_cast(hr) ); MessageBoxW( nullptr, buff, L"DDSView", MB_OK | MB_ICONEXCLAMATION ); return 0; } @@ -176,7 +176,7 @@ int WINAPI wWinMain( _In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, if ( FAILED(hr) || !(flags & (D3D11_FORMAT_SUPPORT_TEXTURE1D|D3D11_FORMAT_SUPPORT_TEXTURE2D|D3D11_FORMAT_SUPPORT_TEXTURE3D)) ) { wchar_t buff[2048] = {}; - swprintf_s( buff, L"Format not supported by DirectX hardware\n\nFilename = %ls\nDXGI Format %d\nFeature Level %d\nHRESULT = %08X", lpCmdLine, mdata.format, g_featureLevel, hr ); + swprintf_s( buff, L"Format not supported by DirectX hardware\n\nFilename = %ls\nDXGI Format %d\nFeature Level %d\nHRESULT = %08X", lpCmdLine, mdata.format, g_featureLevel, static_cast(hr) ); MessageBoxW( nullptr, buff, L"DDSView", MB_OK | MB_ICONEXCLAMATION ); return 0; } @@ -189,7 +189,7 @@ int WINAPI wWinMain( _In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, if ( FAILED(hr) ) { wchar_t buff[2048] = {}; - swprintf_s( buff, L"Failed to load texture file\n\nFilename = %ls\nHRESULT %08X", lpCmdLine, hr ); + swprintf_s( buff, L"Failed to load texture file\n\nFilename = %ls\nHRESULT %08X", lpCmdLine, static_cast(hr) ); MessageBoxW( nullptr, buff, L"DDSView", MB_OK | MB_ICONEXCLAMATION ); return 0; } @@ -201,7 +201,7 @@ int WINAPI wWinMain( _In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, if ( FAILED(hr) ) { wchar_t buff[2048] = {}; - swprintf_s( buff, L"Failed creating texture from file\n\nFilename = %ls\nHRESULT = %08X", lpCmdLine, hr ); + swprintf_s( buff, L"Failed creating texture from file\n\nFilename = %ls\nHRESULT = %08X", lpCmdLine, static_cast(hr) ); MessageBoxW( nullptr, buff, L"DDSView", MB_OK | MB_ICONEXCLAMATION ); return 0; }