mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 14:58:10 -05:00
refactor: use std::extent_v instead of std::extent
This commit is contained in:
@ -44,4 +44,4 @@ const BaseTypeDefinition* const BaseTypeDefinition::UNSIGNED_LONG_LONG = new Bas
|
||||
const BaseTypeDefinition* const BaseTypeDefinition::VOID = new BaseTypeDefinition("void", 0);
|
||||
const BaseTypeDefinition* const BaseTypeDefinition::ALL_BASE_TYPES[]{
|
||||
FLOAT, DOUBLE, BOOL, CHAR, UNSIGNED_CHAR, SHORT, UNSIGNED_SHORT, INT, UNSIGNED_INT, LONG, UNSIGNED_LONG, LONG_LONG, UNSIGNED_LONG_LONG, VOID};
|
||||
const size_t BaseTypeDefinition::ALL_BASE_TYPES_COUNT = std::extent<decltype(ALL_BASE_TYPES)>::value;
|
||||
const size_t BaseTypeDefinition::ALL_BASE_TYPES_COUNT = std::extent_v<decltype(ALL_BASE_TYPES)>;
|
||||
|
@ -19,7 +19,7 @@ std::unique_ptr<CommandsCommonMatchers::matcher_t> CommandsCommonMatchers::Typen
|
||||
"int",
|
||||
"long",
|
||||
};
|
||||
static_assert(std::extent<decltype(BUILT_IN_TYPE_NAMES)>::value
|
||||
static_assert(std::extent_v<decltype(BUILT_IN_TYPE_NAMES)>
|
||||
== static_cast<int>(CommandsParserValueType::BUILT_IN_LAST) - static_cast<int>(CommandsParserValueType::BUILT_IN_FIRST) + 1);
|
||||
|
||||
const CommandsMatcherFactory create(labelSupplier);
|
||||
|
@ -66,7 +66,7 @@ std::unique_ptr<HeaderCommonMatchers::matcher_t> HeaderCommonMatchers::ArrayDef(
|
||||
std::unique_ptr<HeaderCommonMatchers::matcher_t> HeaderCommonMatchers::Typename(const supplier_t* labelSupplier)
|
||||
{
|
||||
static constexpr const char* BUILT_IN_TYPE_NAMES[]{"unsigned", "char", "short", "int", "long"};
|
||||
static_assert(std::extent<decltype(BUILT_IN_TYPE_NAMES)>::value
|
||||
static_assert(std::extent_v<decltype(BUILT_IN_TYPE_NAMES)>
|
||||
== static_cast<int>(HeaderParserValueType::BUILT_IN_LAST) - static_cast<int>(HeaderParserValueType::BUILT_IN_FIRST) + 1);
|
||||
|
||||
const HeaderMatcherFactory create(labelSupplier);
|
||||
|
Reference in New Issue
Block a user