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:
parent
a7ddd0695c
commit
3c79b68973
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user