From fc00b1731dbb0f89e2d71f91917974303d8a2133 Mon Sep 17 00:00:00 2001 From: BurievSardor <80237451+BurievSardor@users.noreply.github.com> Date: Sat, 28 Oct 2023 05:15:20 +0500 Subject: [PATCH] chip::to_underlying is missing [air-quality-sensor-manager] (#30057) * chip::to_underlying is missing * Apply suggested fix to remove unnecessary cast. --------- Co-authored-by: Boris Zbarsky --- .../src/air-quality-sensor-manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/src/air-quality-sensor-manager.cpp b/examples/air-quality-sensor-app/air-quality-sensor-common/src/air-quality-sensor-manager.cpp index 8bc4f4c627925d..a6e94765d86cf8 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/src/air-quality-sensor-manager.cpp +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/src/air-quality-sensor-manager.cpp @@ -136,8 +136,8 @@ void AirQualitySensorManager::Init() void AirQualitySensorManager::OnAirQualityChangeHandler(AirQualityEnum newValue) { - mAirQualityInstance.UpdateAirQuality(static_cast(newValue)); - ChipLogDetail(NotSpecified, "Updated AirQuality value: %huu", newValue); + mAirQualityInstance.UpdateAirQuality(newValue); + ChipLogDetail(NotSpecified, "Updated AirQuality value: %huu", chip::to_underlying(newValue)); } void AirQualitySensorManager::OnCarbonDioxideMeasurementChangeHandler(float newValue)