mirror of
https://github.com/microsoft/DirectXTex.git
synced 2026-02-05 12:46:14 +01:00
Convert internal functions to use Internal namespace instead of leading underscore (#266)
Fixes clang v13 -Wreserved-identifier warning
This commit is contained in:
@@ -216,7 +216,7 @@ namespace
|
||||
#endif
|
||||
}
|
||||
|
||||
IWICImagingFactory* _GetWIC() noexcept
|
||||
IWICImagingFactory* GetWIC() noexcept
|
||||
{
|
||||
static INIT_ONCE s_initOnce = INIT_ONCE_STATIC_INIT;
|
||||
|
||||
@@ -234,7 +234,7 @@ namespace
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
DXGI_FORMAT _WICToDXGI(const GUID& guid) noexcept
|
||||
DXGI_FORMAT WICToDXGI(const GUID& guid) noexcept
|
||||
{
|
||||
for (size_t i = 0; i < std::size(g_WICFormats); ++i)
|
||||
{
|
||||
@@ -254,9 +254,9 @@ namespace
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
size_t _WICBitsPerPixel(REFGUID targetGuid) noexcept
|
||||
size_t WICBitsPerPixel(REFGUID targetGuid) noexcept
|
||||
{
|
||||
auto pWIC = _GetWIC();
|
||||
auto pWIC = GetWIC();
|
||||
if (!pWIC)
|
||||
return 0;
|
||||
|
||||
@@ -449,7 +449,7 @@ namespace
|
||||
|
||||
size_t bpp = 0;
|
||||
|
||||
DXGI_FORMAT format = _WICToDXGI(pixelFormat);
|
||||
DXGI_FORMAT format = WICToDXGI(pixelFormat);
|
||||
if (format == DXGI_FORMAT_UNKNOWN)
|
||||
{
|
||||
if (memcmp(&GUID_WICPixelFormat96bppRGBFixedPoint, &pixelFormat, sizeof(WICPixelFormatGUID)) == 0)
|
||||
@@ -477,9 +477,9 @@ namespace
|
||||
{
|
||||
memcpy_s(&convertGUID, sizeof(WICPixelFormatGUID), &g_WICConvert[i].target, sizeof(GUID));
|
||||
|
||||
format = _WICToDXGI(g_WICConvert[i].target);
|
||||
format = WICToDXGI(g_WICConvert[i].target);
|
||||
assert(format != DXGI_FORMAT_UNKNOWN);
|
||||
bpp = _WICBitsPerPixel(convertGUID);
|
||||
bpp = WICBitsPerPixel(convertGUID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -490,7 +490,7 @@ namespace
|
||||
}
|
||||
else
|
||||
{
|
||||
bpp = _WICBitsPerPixel(pixelFormat);
|
||||
bpp = WICBitsPerPixel(pixelFormat);
|
||||
}
|
||||
|
||||
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
|
||||
@@ -609,7 +609,7 @@ namespace
|
||||
else if (twidth != width || theight != height)
|
||||
{
|
||||
// Resize
|
||||
auto pWIC = _GetWIC();
|
||||
auto pWIC = GetWIC();
|
||||
if (!pWIC)
|
||||
return E_NOINTERFACE;
|
||||
|
||||
@@ -660,7 +660,7 @@ namespace
|
||||
else
|
||||
{
|
||||
// Format conversion but no resize
|
||||
auto pWIC = _GetWIC();
|
||||
auto pWIC = GetWIC();
|
||||
if (!pWIC)
|
||||
return E_NOINTERFACE;
|
||||
|
||||
@@ -921,7 +921,7 @@ HRESULT DirectX::CreateWICTextureFromMemoryEx(
|
||||
if (wicDataSize > UINT32_MAX)
|
||||
return HRESULT_FROM_WIN32(ERROR_FILE_TOO_LARGE);
|
||||
|
||||
auto pWIC = _GetWIC();
|
||||
auto pWIC = GetWIC();
|
||||
if (!pWIC)
|
||||
return E_NOINTERFACE;
|
||||
|
||||
@@ -1055,7 +1055,7 @@ HRESULT DirectX::CreateWICTextureFromFileEx(
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
auto pWIC = _GetWIC();
|
||||
auto pWIC = GetWIC();
|
||||
if (!pWIC)
|
||||
return E_NOINTERFACE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user