From 727050520b45f9b09bbdb85c82af4c8d587cdbbb Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sat, 17 Jun 2023 17:24:51 +0200 Subject: [PATCH] that should do the job --- dummies/helperFactory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dummies/helperFactory.cpp b/dummies/helperFactory.cpp index 6cd78f93..cbe979bf 100644 --- a/dummies/helperFactory.cpp +++ b/dummies/helperFactory.cpp @@ -192,9 +192,8 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio new Max31865Dummy(objects::RTD_15_IC18_IMTQ, objects::DUMMY_COM_IF, comCookieDummy)); std::optional tmpSensorDummies; - TemperatureSensorInserter::Tmp1075DummyMap tmpDummyMap; if (cfg.addTmpDummies) { - tmpSensorDummies = tmpDummyMap; + TemperatureSensorInserter::Tmp1075DummyMap tmpDummyMap; if (cfg.tmp1075Cfg.addTcsBrd0) { tmpDummyMap.emplace(objects::TMP1075_HANDLER_TCS_0, new Tmp1075Dummy(objects::TMP1075_HANDLER_TCS_0, objects::DUMMY_COM_IF, @@ -220,6 +219,7 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio new Tmp1075Dummy(objects::TMP1075_HANDLER_IF_BOARD, objects::DUMMY_COM_IF, comCookieDummy)); } + tmpSensorDummies = std::move(tmpDummyMap); } new TemperatureSensorInserter(objects::THERMAL_TEMP_INSERTER, rtdSensorDummies, tmpSensorDummies);