From f4cc612f931119f259e2c09d9d21d01e18bd4f7f Mon Sep 17 00:00:00 2001 From: matth-x <63792403+matth-x@users.noreply.github.com> Date: Sun, 22 Oct 2023 19:55:48 +0200 Subject: [PATCH] fix compilation on espressif8266 --- .github/workflows/platformless.yml | 2 +- src/MicroOcpp/Model/Metering/MeteringConnector.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)) {