diff --git a/DirectXTex/DirectXTexUtil.cpp b/DirectXTex/DirectXTexUtil.cpp index 795d9f2..6f4e549 100644 --- a/DirectXTex/DirectXTexUtil.cpp +++ b/DirectXTex/DirectXTexUtil.cpp @@ -37,12 +37,12 @@ namespace //------------------------------------------------------------------------------------- struct WICTranslate { - GUID wic; + const GUID& wic; DXGI_FORMAT format; bool srgb; }; - const WICTranslate g_WICFormats[] = + constexpr WICTranslate g_WICFormats[] = { { GUID_WICPixelFormat128bppRGBAFloat, DXGI_FORMAT_R32G32B32A32_FLOAT, false }, diff --git a/DirectXTex/DirectXTexWIC.cpp b/DirectXTex/DirectXTexWIC.cpp index 9b73048..57315a4 100644 --- a/DirectXTex/DirectXTexWIC.cpp +++ b/DirectXTex/DirectXTexWIC.cpp @@ -79,12 +79,12 @@ namespace struct WICConvert { - GUID source; - GUID target; + const GUID& source; + const GUID& target; TEX_ALPHA_MODE alphaMode; }; - const WICConvert g_WICConvert[] = + constexpr WICConvert g_WICConvert[] = { // Directly support the formats listed in XnaTexUtil::g_WICFormats, so no conversion required // Note target GUID in this conversion table must be one of those directly supported formats. diff --git a/WICTextureLoader/WICTextureLoader11.cpp b/WICTextureLoader/WICTextureLoader11.cpp index a0f3402..3cb23bc 100644 --- a/WICTextureLoader/WICTextureLoader11.cpp +++ b/WICTextureLoader/WICTextureLoader11.cpp @@ -63,11 +63,11 @@ namespace //------------------------------------------------------------------------------------- struct WICTranslate { - GUID wic; + const GUID& wic; DXGI_FORMAT format; }; - const WICTranslate g_WICFormats[] = + constexpr WICTranslate g_WICFormats[] = { { GUID_WICPixelFormat128bppRGBAFloat, DXGI_FORMAT_R32G32B32A32_FLOAT }, @@ -98,11 +98,11 @@ namespace struct WICConvert { - GUID source; - GUID target; + const GUID& source; + const GUID& target; }; - const WICConvert g_WICConvert[] = + constexpr WICConvert g_WICConvert[] = { // Note target GUID in this conversion table must be one of those directly supported formats (above). diff --git a/WICTextureLoader/WICTextureLoader12.cpp b/WICTextureLoader/WICTextureLoader12.cpp index 9970479..de8cee2 100644 --- a/WICTextureLoader/WICTextureLoader12.cpp +++ b/WICTextureLoader/WICTextureLoader12.cpp @@ -50,11 +50,11 @@ namespace //------------------------------------------------------------------------------------- struct WICTranslate { - GUID wic; + const GUID& wic; DXGI_FORMAT format; }; - const WICTranslate g_WICFormats[] = + constexpr WICTranslate g_WICFormats[] = { { GUID_WICPixelFormat128bppRGBAFloat, DXGI_FORMAT_R32G32B32A32_FLOAT }, @@ -87,11 +87,11 @@ namespace struct WICConvert { - GUID source; - GUID target; + const GUID& source; + const GUID& target; }; - const WICConvert g_WICConvert[] = + constexpr WICConvert g_WICConvert[] = { // Note target GUID in this conversion table must be one of those directly supported formats (above). diff --git a/WICTextureLoader/WICTextureLoader9.cpp b/WICTextureLoader/WICTextureLoader9.cpp index f68b4f9..2083216 100644 --- a/WICTextureLoader/WICTextureLoader9.cpp +++ b/WICTextureLoader/WICTextureLoader9.cpp @@ -47,11 +47,11 @@ namespace //------------------------------------------------------------------------------------- struct WICTranslate { - GUID wic; + const GUID& wic; D3DFORMAT format; }; - const WICTranslate g_WICFormats[] = + constexpr WICTranslate g_WICFormats[] = { { GUID_WICPixelFormat128bppRGBAFloat, D3DFMT_A32B32G32R32F }, @@ -80,11 +80,11 @@ namespace struct WICConvert { - GUID source; - GUID target; + const GUID& source; + const GUID& target; }; - const WICConvert g_WICConvert[] = + constexpr WICConvert g_WICConvert[] = { // Note target GUID in this conversion table must be one of those directly supported formats (above).