1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +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:
Thaddeus Crews
2025-03-07 15:12:25 -06:00
33 changed files with 71 additions and 67 deletions

View File

@@ -1908,7 +1908,7 @@ CodeTextEditor::CodeTextEditor() {
zoom_button->set_text("100 %");
PopupMenu *zoom_menu = zoom_button->get_popup();
int preset_count = sizeof(ZOOM_FACTOR_PRESETS) / sizeof(float);
constexpr int preset_count = std::size(ZOOM_FACTOR_PRESETS);
for (int i = 0; i < preset_count; i++) {
float z = ZOOM_FACTOR_PRESETS[i];