From 8500fbdc2ab7988a08141a80699e725dd32bb942 Mon Sep 17 00:00:00 2001 From: "Maaike Zijderveld, iolar" Date: Wed, 4 Dec 2024 10:41:13 +0100 Subject: [PATCH] formatting Signed-off-by: Maaike Zijderveld, iolar --- include/ocpp/v201/functional_blocks/reservation.hpp | 3 +-- lib/ocpp/v201/functional_blocks/reservation.cpp | 3 ++- .../lib/ocpp/v201/functional_blocks/test_reservation.cpp | 9 +++------ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/include/ocpp/v201/functional_blocks/reservation.hpp b/include/ocpp/v201/functional_blocks/reservation.hpp index d51b3c937..6f3eff33e 100644 --- a/include/ocpp/v201/functional_blocks/reservation.hpp +++ b/include/ocpp/v201/functional_blocks/reservation.hpp @@ -16,7 +16,7 @@ class EvseManagerInterface; class ReservationInterface : public MessageHandlerInterface { public: - virtual ~ReservationInterface() {}; + virtual ~ReservationInterface(){}; virtual void on_reservation_status(const int32_t reservation_id, const ReservationUpdateStatusEnum status) = 0; virtual ocpp::ReservationCheckStatus is_evse_reserved_for_other(const EvseInterface& evse, const IdToken& id_token, @@ -61,7 +61,6 @@ class Reservation : public ReservationInterface { virtual void on_reservation_cleared(const int32_t evse_id, const int32_t connector_id) override; private: // Functions - void handle_reserve_now_request(Call call); void handle_cancel_reservation_callback(Call call); diff --git a/lib/ocpp/v201/functional_blocks/reservation.cpp b/lib/ocpp/v201/functional_blocks/reservation.cpp index e55faa8a5..a92fb0dfa 100644 --- a/lib/ocpp/v201/functional_blocks/reservation.cpp +++ b/lib/ocpp/v201/functional_blocks/reservation.cpp @@ -79,7 +79,8 @@ void Reservation::handle_reserve_now_request(Call call) { .value_or(false)) { status_info = "Reservation is not available"; reservation_available = false; - } else if (!this->device_model->get_optional_value(ControllerComponentVariables::ReservationCtrlrEnabled).value_or(false)) { + } else if (!this->device_model->get_optional_value(ControllerComponentVariables::ReservationCtrlrEnabled) + .value_or(false)) { reservation_available = false; status_info = "Reservation is not enabled"; } diff --git a/tests/lib/ocpp/v201/functional_blocks/test_reservation.cpp b/tests/lib/ocpp/v201/functional_blocks/test_reservation.cpp index bc9aa07bc..29800389a 100644 --- a/tests/lib/ocpp/v201/functional_blocks/test_reservation.cpp +++ b/tests/lib/ocpp/v201/functional_blocks/test_reservation.cpp @@ -65,18 +65,15 @@ class ReservationTest : public ::testing::Test { // Check values const bool reservation_available_in_device_model = - dm->get_optional_value(ControllerComponentVariables::ReservationCtrlrAvailable) - .value_or(false); + dm->get_optional_value(ControllerComponentVariables::ReservationCtrlrAvailable).value_or(false); EXPECT_EQ(reservation_available_in_device_model, is_reservation_available); const bool reservation_enabled_in_device_model = - dm->get_optional_value(ControllerComponentVariables::ReservationCtrlrEnabled) - .value_or(false); + dm->get_optional_value(ControllerComponentVariables::ReservationCtrlrEnabled).value_or(false); EXPECT_EQ(reservation_enabled_in_device_model, is_reservation_enabled); const bool non_evse_specific_enabled_device_model = - dm->get_optional_value(ControllerComponentVariables::ReservationCtrlrNonEvseSpecific) - .value_or(false); + dm->get_optional_value(ControllerComponentVariables::ReservationCtrlrNonEvseSpecific).value_or(false); EXPECT_EQ(non_evse_specific_enabled_device_model, non_evse_specific_enabled); return dm;