mirror of
https://github.com/godotengine/godot.git
synced 2025-11-03 15:11:19 +00:00
Use std::size instead of sizeof(a) / sizeof(a[0]) pattern throughout the codebase.
This commit is contained in:
parent
f0f5319b0b
commit
e34f1f504c
33 changed files with 71 additions and 67 deletions
|
|
@ -245,7 +245,7 @@ String GDScriptWarning::get_name_from_code(Code p_code) {
|
|||
#endif
|
||||
};
|
||||
|
||||
static_assert((sizeof(names) / sizeof(*names)) == WARNING_MAX, "Amount of warning types don't match the amount of warning names.");
|
||||
static_assert(std::size(names) == WARNING_MAX, "Amount of warning types don't match the amount of warning names.");
|
||||
|
||||
return names[(int)p_code];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue