From ec8c5b7a5c922122151733bcb975f93ff4b7cc99 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 17 Feb 2023 16:32:33 +0100 Subject: [PATCH] fix shadowing warning --- mission/controller/ThermalController.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/mission/controller/ThermalController.cpp b/mission/controller/ThermalController.cpp index 71137668..ecc3566e 100644 --- a/mission/controller/ThermalController.cpp +++ b/mission/controller/ThermalController.cpp @@ -115,13 +115,9 @@ void ThermalController::performControlOperation() { { PoolReadGuard pg(&heaterInfo); - if (pg.getReadResult() == returnvalue::OK) { - { - PoolReadGuard pg(¤tVecPdu2); - if (pg.getReadResult() == returnvalue::OK) { - heaterInfo.heaterCurrent.value = currentVecPdu2.value[PDU2::Channels::TCS_HEATER_IN]; - } - } + PoolReadGuard pg2(¤tVecPdu2); + if (pg.getReadResult() == returnvalue::OK and pg2.getReadResult() == returnvalue::OK) { + heaterInfo.heaterCurrent.value = currentVecPdu2.value[PDU2::Channels::TCS_HEATER_IN]; } }