Use std::size instead of sizeof(a) / sizeof(a[0]) pattern throughout the codebase.

This commit is contained in:
Lukas Tenbrink committed 2025-02-07 14:57:48 +01:00
1 parent f0f5319b0b
commit e34f1f504c
33 files changed
+71 -67

No files matched your search

+1 -1
View File
@@ -1917,7 +1917,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];