mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-14 06:00:14 +02:00
constexpr usage for IsValid
This commit is contained in:
parent
a7ddd0695c
commit
3c79b68973
@ -40,7 +40,7 @@ namespace DirectX
|
|||||||
|
|
||||||
//---------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------
|
||||||
// DXGI Format Utilities
|
// 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 IsCompressed(_In_ DXGI_FORMAT fmt) noexcept;
|
||||||
bool __cdecl IsPacked(_In_ DXGI_FORMAT fmt) noexcept;
|
bool __cdecl IsPacked(_In_ DXGI_FORMAT fmt) noexcept;
|
||||||
bool __cdecl IsVideo(_In_ DXGI_FORMAT fmt) noexcept;
|
bool __cdecl IsVideo(_In_ DXGI_FORMAT fmt) noexcept;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
//=====================================================================================
|
//=====================================================================================
|
||||||
|
|
||||||
_Use_decl_annotations_
|
_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);
|
return (static_cast<size_t>(fmt) >= 1 && static_cast<size_t>(fmt) <= 190);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user