diff --git a/DirectXTex/DirectXTex.h b/DirectXTex/DirectXTex.h index a7e0681..f5660f3 100644 --- a/DirectXTex/DirectXTex.h +++ b/DirectXTex/DirectXTex.h @@ -40,7 +40,7 @@ namespace DirectX //--------------------------------------------------------------------------------- // DXGI Format Utilities - bool __cdecl IsValid(_In_ DXGI_FORMAT fmt) noexcept; + constexpr bool __cdecl IsValid(_In_ DXGI_FORMAT fmt) noexcept; bool __cdecl IsCompressed(_In_ DXGI_FORMAT fmt) noexcept; bool __cdecl IsPacked(_In_ DXGI_FORMAT fmt) noexcept; bool __cdecl IsVideo(_In_ DXGI_FORMAT fmt) noexcept; diff --git a/DirectXTex/DirectXTex.inl b/DirectXTex/DirectXTex.inl index a430b25..aa501b1 100644 --- a/DirectXTex/DirectXTex.inl +++ b/DirectXTex/DirectXTex.inl @@ -16,7 +16,7 @@ //===================================================================================== _Use_decl_annotations_ -inline bool __cdecl IsValid(DXGI_FORMAT fmt) noexcept +constexpr inline bool __cdecl IsValid(DXGI_FORMAT fmt) noexcept { return (static_cast(fmt) >= 1 && static_cast(fmt) <= 190); }