mirror of
https://github.com/microsoft/DirectXTex
synced 2024-11-21 20:10:05 +00:00
Minor code review
This commit is contained in:
parent
a2cb6fa763
commit
20a685d62f
@ -277,10 +277,13 @@ IWICImagingFactory* DirectX::GetWICFactory(bool& iswic2) noexcept
|
||||
|
||||
static INIT_ONCE s_initOnce = INIT_ONCE_STATIC_INIT;
|
||||
|
||||
InitOnceExecuteOnce(&s_initOnce,
|
||||
if (!InitOnceExecuteOnce(&s_initOnce,
|
||||
InitializeWICFactory,
|
||||
nullptr,
|
||||
reinterpret_cast<LPVOID*>(&g_Factory));
|
||||
reinterpret_cast<LPVOID*>(&g_Factory)))
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
iswic2 = g_WIC2;
|
||||
return g_Factory;
|
||||
|
@ -751,10 +751,13 @@ namespace
|
||||
static INIT_ONCE s_initOnce = INIT_ONCE_STATIC_INIT;
|
||||
|
||||
IWICImagingFactory* factory = nullptr;
|
||||
InitOnceExecuteOnce(&s_initOnce,
|
||||
if (!InitOnceExecuteOnce(&s_initOnce,
|
||||
InitializeWICFactory,
|
||||
nullptr,
|
||||
reinterpret_cast<LPVOID*>(&factory));
|
||||
reinterpret_cast<LPVOID*>(&factory)))
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return factory;
|
||||
}
|
||||
|
@ -828,10 +828,13 @@ namespace
|
||||
static INIT_ONCE s_initOnce = INIT_ONCE_STATIC_INIT;
|
||||
|
||||
IWICImagingFactory2* factory = nullptr;
|
||||
(void)InitOnceExecuteOnce(&s_initOnce,
|
||||
if (!InitOnceExecuteOnce(&s_initOnce,
|
||||
InitializeWICFactory,
|
||||
nullptr,
|
||||
reinterpret_cast<LPVOID*>(&factory));
|
||||
reinterpret_cast<LPVOID*>(&factory)))
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return factory;
|
||||
}
|
||||
|
@ -208,10 +208,13 @@ namespace
|
||||
static INIT_ONCE s_initOnce = INIT_ONCE_STATIC_INIT;
|
||||
|
||||
IWICImagingFactory* factory = nullptr;
|
||||
(void)InitOnceExecuteOnce(&s_initOnce,
|
||||
if (!InitOnceExecuteOnce(&s_initOnce,
|
||||
InitializeWICFactory,
|
||||
nullptr,
|
||||
reinterpret_cast<LPVOID*>(&factory));
|
||||
reinterpret_cast<LPVOID*>(&factory)))
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return factory;
|
||||
}
|
||||
|
@ -166,10 +166,13 @@ namespace
|
||||
static INIT_ONCE s_initOnce = INIT_ONCE_STATIC_INIT;
|
||||
|
||||
IWICImagingFactory2* factory = nullptr;
|
||||
(void)InitOnceExecuteOnce(&s_initOnce,
|
||||
if (!InitOnceExecuteOnce(&s_initOnce,
|
||||
InitializeWICFactory,
|
||||
nullptr,
|
||||
reinterpret_cast<LPVOID*>(&factory));
|
||||
reinterpret_cast<LPVOID*>(&factory)))
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return factory;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user