Replaced _countof / ARRAYSIZE with std::size

This commit is contained in:
Chuck Walbourn
2021-01-02 12:44:35 -08:00
parent 2f8e8120ae
commit f764da5176
15 changed files with 38 additions and 37 deletions

View File

@@ -230,7 +230,7 @@ namespace
//---------------------------------------------------------------------------------
DXGI_FORMAT _WICToDXGI(const GUID& guid) noexcept
{
for (size_t i = 0; i < _countof(g_WICFormats); ++i)
for (size_t i = 0; i < std::size(g_WICFormats); ++i)
{
if (memcmp(&g_WICFormats[i].wic, &guid, sizeof(GUID)) == 0)
return g_WICFormats[i].format;
@@ -465,7 +465,7 @@ namespace
}
else
{
for (size_t i = 0; i < _countof(g_WICConvert); ++i)
for (size_t i = 0; i < std::size(g_WICConvert); ++i)
{
if (memcmp(&g_WICConvert[i].source, &pixelFormat, sizeof(WICPixelFormatGUID)) == 0)
{