Use std::size instead of sizeof(a) / sizeof(a[0]) pattern throughout the codebase.

This commit is contained in:
Lukas Tenbrink
2025-02-04 17:35:39 +01:00
parent f0f5319b0b
commit e34f1f504c
33 changed files with 71 additions and 67 deletions

View File

@ -154,7 +154,7 @@ public:
#endif
};
static_assert((sizeof(default_warning_levels) / sizeof(default_warning_levels[0])) == WARNING_MAX, "Amount of default levels does not match the amount of warnings.");
static_assert(std::size(default_warning_levels) == WARNING_MAX, "Amount of default levels does not match the amount of warnings.");
Code code = WARNING_MAX;
int start_line = -1, end_line = -1;