mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +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
|
|
@ -929,7 +929,7 @@ void AnimationNodeStateMachineEditor::_connection_draw(const Vector2 &p_from, co
|
|||
state_machine_draw->draw_line(p_from, p_from.lerp(p_to, p_fade_ratio), fade_line_color, 2);
|
||||
}
|
||||
|
||||
const int ICON_COUNT = sizeof(theme_cache.transition_icons) / sizeof(*theme_cache.transition_icons);
|
||||
const int ICON_COUNT = std::size(theme_cache.transition_icons);
|
||||
int icon_index = p_mode + (p_auto_advance ? ICON_COUNT / 2 : 0);
|
||||
ERR_FAIL_COND(icon_index >= ICON_COUNT);
|
||||
Ref<Texture2D> icon = theme_cache.transition_icons[icon_index];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue