Convert internal functions to use Internal namespace instead of leading underscore (#266)

Fixes clang v13 -Wreserved-identifier warning
This commit is contained in:
Chuck Walbourn
2022-02-20 14:47:07 -08:00
committed by GitHub
parent 192e674537
commit 469c65406a
24 changed files with 1132 additions and 1074 deletions

View File

@@ -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;