mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-09 11:40:14 +02: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;
|
static INIT_ONCE s_initOnce = INIT_ONCE_STATIC_INIT;
|
||||||
|
|
||||||
InitOnceExecuteOnce(&s_initOnce,
|
if (!InitOnceExecuteOnce(&s_initOnce,
|
||||||
InitializeWICFactory,
|
InitializeWICFactory,
|
||||||
nullptr,
|
nullptr,
|
||||||
reinterpret_cast<LPVOID*>(&g_Factory));
|
reinterpret_cast<LPVOID*>(&g_Factory)))
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
iswic2 = g_WIC2;
|
iswic2 = g_WIC2;
|
||||||
return g_Factory;
|
return g_Factory;
|
||||||
|
@ -751,10 +751,13 @@ namespace
|
|||||||
static INIT_ONCE s_initOnce = INIT_ONCE_STATIC_INIT;
|
static INIT_ONCE s_initOnce = INIT_ONCE_STATIC_INIT;
|
||||||
|
|
||||||
IWICImagingFactory* factory = nullptr;
|
IWICImagingFactory* factory = nullptr;
|
||||||
InitOnceExecuteOnce(&s_initOnce,
|
if (!InitOnceExecuteOnce(&s_initOnce,
|
||||||
InitializeWICFactory,
|
InitializeWICFactory,
|
||||||
nullptr,
|
nullptr,
|
||||||
reinterpret_cast<LPVOID*>(&factory));
|
reinterpret_cast<LPVOID*>(&factory)))
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
return factory;
|
return factory;
|
||||||
}
|
}
|
||||||
|
@ -828,10 +828,13 @@ namespace
|
|||||||
static INIT_ONCE s_initOnce = INIT_ONCE_STATIC_INIT;
|
static INIT_ONCE s_initOnce = INIT_ONCE_STATIC_INIT;
|
||||||
|
|
||||||
IWICImagingFactory2* factory = nullptr;
|
IWICImagingFactory2* factory = nullptr;
|
||||||
(void)InitOnceExecuteOnce(&s_initOnce,
|
if (!InitOnceExecuteOnce(&s_initOnce,
|
||||||
InitializeWICFactory,
|
InitializeWICFactory,
|
||||||
nullptr,
|
nullptr,
|
||||||
reinterpret_cast<LPVOID*>(&factory));
|
reinterpret_cast<LPVOID*>(&factory)))
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
return factory;
|
return factory;
|
||||||
}
|
}
|
||||||
|
@ -208,10 +208,13 @@ namespace
|
|||||||
static INIT_ONCE s_initOnce = INIT_ONCE_STATIC_INIT;
|
static INIT_ONCE s_initOnce = INIT_ONCE_STATIC_INIT;
|
||||||
|
|
||||||
IWICImagingFactory* factory = nullptr;
|
IWICImagingFactory* factory = nullptr;
|
||||||
(void)InitOnceExecuteOnce(&s_initOnce,
|
if (!InitOnceExecuteOnce(&s_initOnce,
|
||||||
InitializeWICFactory,
|
InitializeWICFactory,
|
||||||
nullptr,
|
nullptr,
|
||||||
reinterpret_cast<LPVOID*>(&factory));
|
reinterpret_cast<LPVOID*>(&factory)))
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
return factory;
|
return factory;
|
||||||
}
|
}
|
||||||
|
@ -166,10 +166,13 @@ namespace
|
|||||||
static INIT_ONCE s_initOnce = INIT_ONCE_STATIC_INIT;
|
static INIT_ONCE s_initOnce = INIT_ONCE_STATIC_INIT;
|
||||||
|
|
||||||
IWICImagingFactory2* factory = nullptr;
|
IWICImagingFactory2* factory = nullptr;
|
||||||
(void)InitOnceExecuteOnce(&s_initOnce,
|
if (!InitOnceExecuteOnce(&s_initOnce,
|
||||||
InitializeWICFactory,
|
InitializeWICFactory,
|
||||||
nullptr,
|
nullptr,
|
||||||
reinterpret_cast<LPVOID*>(&factory));
|
reinterpret_cast<LPVOID*>(&factory)))
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
return factory;
|
return factory;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user