1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

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

@@ -407,7 +407,7 @@ static const _BuiltinActionDisplayName _builtin_action_display_names[] = {
};
String InputMap::get_builtin_display_name(const String &p_name) const {
int len = sizeof(_builtin_action_display_names) / sizeof(_BuiltinActionDisplayName);
constexpr int len = std::size(_builtin_action_display_names);
for (int i = 0; i < len; i++) {
if (_builtin_action_display_names[i].name == p_name) {