mirror of
https://github.com/microsoft/DirectXTex.git
synced 2026-02-04 12:16:14 +01:00
Minor code review
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user