diff --git a/.github/workflows/platformless.yml b/.github/workflows/platformless.yml index ce5251a2..9682e919 100644 --- a/.github/workflows/platformless.yml +++ b/.github/workflows/platformless.yml @@ -26,4 +26,4 @@ jobs: - name: Get ArduinoJson run: wget -Uri https://github.com/bblanchon/ArduinoJson/releases/download/v6.19.4/ArduinoJson-v6.19.4.h -O ./src/ArduinoJson.h - name: Compile - run: g++ -c -std=c++11 -I ./src $(find ./src -type f -iregex ".*\.cpp") -DMO_PLATFORM=MO_PLATFORM_NONE -Wall -Wextra -Wno-unused-parameter -Werror + run: g++ -c -std=c++11 -I ./src $(find ./src -type f -iregex ".*\.cpp") -DMO_PLATFORM=MO_PLATFORM_NONE -Wall -Wextra -Wno-unused-parameter -Wno-redundant-move -Werror diff --git a/src/MicroOcpp/Model/Metering/MeteringConnector.cpp b/src/MicroOcpp/Model/Metering/MeteringConnector.cpp index 1f126161..fb84a24a 100644 --- a/src/MicroOcpp/Model/Metering/MeteringConnector.cpp +++ b/src/MicroOcpp/Model/Metering/MeteringConnector.cpp @@ -59,7 +59,7 @@ std::unique_ptr MeteringConnector::loop() { if ((txBreak || meterData.size() >= (size_t) meterValueCacheSizeInt->getInt()) && !meterData.empty()) { auto meterValues = std::unique_ptr(new MeterValues(std::move(meterData), connectorId, transaction)); meterData.clear(); - return meterValues; + return std::move(meterValues); } if (model.getConnector(connectorId)) {