From 23fedd80526c24e0b1592ad843d9066243dbb194 Mon Sep 17 00:00:00 2001 From: Matthew Colvin <35540398+Mc067415@users.noreply.github.com> Date: Sun, 27 Aug 2023 20:30:00 -0500 Subject: [PATCH] move construction of Hardware sim components to member init list --- .../HAL/Targets/Simulator/HardwareSimulator.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Platformio/HAL/Targets/Simulator/HardwareSimulator.cpp b/Platformio/HAL/Targets/Simulator/HardwareSimulator.cpp index d7b4c1f..3e4c349 100644 --- a/Platformio/HAL/Targets/Simulator/HardwareSimulator.cpp +++ b/Platformio/HAL/Targets/Simulator/HardwareSimulator.cpp @@ -14,13 +14,11 @@ HardwareSimulator::HardwareSimulator(): HardwareAbstract(), while(true){ std::this_thread::sleep_for(std::chrono::milliseconds(2)); lv_tick_inc(2); /*Tell lvgl that 2 milliseconds were elapsed*/ - }}) -{ - mBattery = std::make_shared(); - mDisplay = SDLDisplay::getInstance(); - mWifiHandler = std::make_shared(); - -} + }}), + mBattery(std::make_shared()), + mDisplay(SDLDisplay::getInstance()), + mWifiHandler(std::make_shared()) +{} std::shared_ptr HardwareSimulator::battery(){ return mBattery;