mirror of
https://github.com/microsoft/DirectXTex.git
synced 2026-02-04 04:16:12 +01:00
constexpr usage for IsValid
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user