mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #102419 from Ivorforce/std-size
Use `std::size` instead of `sizeof(a) / sizeof(a[0])` pattern throughout the codebase.
This commit is contained in:
commit
c937b6d180
33 changed files with 71 additions and 67 deletions
|
|
@ -152,7 +152,7 @@ String Performance::get_monitor_name(Monitor p_monitor) const {
|
|||
PNAME("pipeline/compilations_draw"),
|
||||
PNAME("pipeline/compilations_specialization"),
|
||||
};
|
||||
static_assert((sizeof(names) / sizeof(const char *)) == MONITOR_MAX);
|
||||
static_assert(std::size(names) == MONITOR_MAX);
|
||||
|
||||
return names[p_monitor];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue