refactor: use std::extent_v instead of std::extent

This commit is contained in:
Jan
2024-03-24 19:45:55 +01:00
parent 3cbdd5b735
commit 4f0ee35740
29 changed files with 112 additions and 115 deletions

View File

@ -8,9 +8,9 @@ namespace image::image_format
{
TEST_CASE("ImageFormat: EnsureAllFormatsArrayIndicesAreIds", "[image]")
{
REQUIRE(static_cast<unsigned int>(ImageFormatId::MAX) == std::extent<decltype(ImageFormat::ALL_FORMATS)>::value);
REQUIRE(static_cast<unsigned int>(ImageFormatId::MAX) == std::extent_v<decltype(ImageFormat::ALL_FORMATS)>);
for (unsigned i = 0; i < std::extent<decltype(ImageFormat::ALL_FORMATS)>::value; i++)
for (unsigned i = 0; i < std::extent_v<decltype(ImageFormat::ALL_FORMATS)>; i++)
{
REQUIRE(ImageFormat::ALL_FORMATS[i] != nullptr);
REQUIRE(i == static_cast<unsigned>(ImageFormat::ALL_FORMATS[i]->GetId()));