From 84d12b068cc03074ff61c139874b183e0360b97b Mon Sep 17 00:00:00 2001 From: Kai-Uwe Hermann Date: Thu, 14 Nov 2024 11:28:32 +0100 Subject: [PATCH] Use if to check for monitor type instead of switch to silence compiler warnings Signed-off-by: Kai-Uwe Hermann --- lib/ocpp/v201/monitoring_updater.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ocpp/v201/monitoring_updater.cpp b/lib/ocpp/v201/monitoring_updater.cpp index f7ff5c8e2..df08bdb3a 100644 --- a/lib/ocpp/v201/monitoring_updater.cpp +++ b/lib/ocpp/v201/monitoring_updater.cpp @@ -209,9 +209,8 @@ void MonitoringUpdater::evaluate_monitor(const VariableMonitoringMeta& monitor_m const VariableAttribute& attribute, const std::string& value_previous, const std::string& value_current) { // Don't care about periodic - switch (monitor_meta.monitor.type) { - case MonitorEnum::Periodic: - case MonitorEnum::PeriodicClockAligned: + if (monitor_meta.monitor.type == MonitorEnum::Periodic or + monitor_meta.monitor.type == MonitorEnum::PeriodicClockAligned) { return; }