1
0
mirror of https://github.com/microsoft/DirectXTex synced 2025-01-14 19:40:18 +00:00

constexpr usage for IsValid

This commit is contained in:
Chuck Walbourn 2020-02-26 15:55:05 -08:00
parent a7ddd0695c
commit 3c79b68973
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -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<size_t>(fmt) >= 1 && static_cast<size_t>(fmt) <= 190);
}