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