1
0
mirror of https://github.com/microsoft/DirectXTex synced 2024-11-22 04:20:07 +00:00

Cleaned up some warnings

This commit is contained in:
Chuck Walbourn 2017-12-05 13:49:15 -08:00
parent 1e1fdb8d86
commit 09e19e15b6
3 changed files with 10 additions and 5 deletions

View File

@ -2886,7 +2886,7 @@ namespace
};
#pragma prefast( suppress : 25004, "Signature must match bsearch_s" );
int __cdecl _ConvertCompare(void *context, const void* ptr1, const void *ptr2)
int __cdecl ConvertCompare(void *context, const void* ptr1, const void *ptr2) DIRECTX_NOEXCEPT
{
UNREFERENCED_PARAMETER(context);
const ConvertData *p1 = reinterpret_cast<const ConvertData*>(ptr1);
@ -2912,7 +2912,7 @@ DWORD DirectX::_GetConvertFlags(DXGI_FORMAT format)
ConvertData key = { format, 0 };
const ConvertData* in = (const ConvertData*)bsearch_s(&key, g_ConvertTable, _countof(g_ConvertTable), sizeof(ConvertData),
_ConvertCompare, nullptr);
ConvertCompare, nullptr);
return (in) ? in->flags : 0;
}
@ -2945,10 +2945,10 @@ void DirectX::_ConvertScanline(
// Determine conversion details about source and dest formats
ConvertData key = { inFormat, 0 };
const ConvertData* in = (const ConvertData*)bsearch_s(&key, g_ConvertTable, _countof(g_ConvertTable), sizeof(ConvertData),
_ConvertCompare, nullptr);
ConvertCompare, nullptr);
key.format = outFormat;
const ConvertData* out = (const ConvertData*)bsearch_s(&key, g_ConvertTable, _countof(g_ConvertTable), sizeof(ConvertData),
_ConvertCompare, nullptr);
ConvertCompare, nullptr);
if (!in || !out)
{
assert(false);

View File

@ -118,6 +118,11 @@
#define XBOX_DXGI_FORMAT_R4G4_UNORM DXGI_FORMAT(190)
#if !defined(DIRECTX_NOEXCEPT) && defined(_MSC_VER) && (_MSC_VER < 1900)
#define DIRECTX_NOEXCEPT
#else
#define DIRECTX_NOEXCEPT noexcept
#endif
namespace DirectX
{

View File

@ -240,7 +240,7 @@ IWICImagingFactory* DirectX::GetWICFactory(bool& iswic2)
static INIT_ONCE s_initOnce = INIT_ONCE_STATIC_INIT;
InitOnceExecuteOnce(&s_initOnce,
[](PINIT_ONCE, PVOID, LPVOID *factory) -> BOOL
[](PINIT_ONCE, PVOID, LPVOID *factory) DIRECTX_NOEXCEPT -> BOOL
{
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
HRESULT hr = CoCreateInstance(