From a6c70576be4c55f018e53ad49654616203e432e6 Mon Sep 17 00:00:00 2001 From: AThousandShips <96648715+AThousandShips@users.noreply.github.com> Date: Tue, 7 Jan 2025 19:09:06 +0100 Subject: [PATCH] [Main] Fix missing performance data Also future-proof entries to ensure size. --- main/performance.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main/performance.cpp b/main/performance.cpp index 398511995b0..214e89696ff 100644 --- a/main/performance.cpp +++ b/main/performance.cpp @@ -152,6 +152,7 @@ String Performance::get_monitor_name(Monitor p_monitor) const { PNAME("pipeline/compilations_draw"), PNAME("pipeline/compilations_specialization"), }; + static_assert((sizeof(names) / sizeof(const char *)) == MONITOR_MAX); return names[p_monitor]; } @@ -292,8 +293,14 @@ Performance::MonitorType Performance::get_monitor_type(Monitor p_monitor) const MONITOR_TYPE_QUANTITY, MONITOR_TYPE_QUANTITY, MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_QUANTITY, }; + static_assert((sizeof(types) / sizeof(MonitorType)) == MONITOR_MAX); return types[p_monitor]; }