From c0ac552cb765034548a301026bc32511545b61ed Mon Sep 17 00:00:00 2001 From: Soumya Subramanya Date: Wed, 18 Oct 2023 14:24:53 +0200 Subject: [PATCH] Fix formatting issues Signed-off-by: Soumya Subramanya --- include/ocpp/v201/device_model.hpp | 11 ++++++----- lib/ocpp/v201/device_model.cpp | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/ocpp/v201/device_model.hpp b/include/ocpp/v201/device_model.hpp index f6051254cd..9e4f65fb55 100644 --- a/include/ocpp/v201/device_model.hpp +++ b/include/ocpp/v201/device_model.hpp @@ -58,7 +58,8 @@ class DeviceModel { /// \param allow_write_only true to allow a writeOnly value to be read. /// \return GetVariableStatusEnum that indicates the result of the request GetVariableStatusEnum request_value_internal(const Component& component_id, const Variable& variable_id, - const AttributeEnum& attribute_enum, std::string& value, bool allow_write_only); + const AttributeEnum& attribute_enum, std::string& value, + bool allow_write_only); /// \brief Iterates over the given \p component_criteria and converts this to the variable names /// (Active,Available,Enabled,Problem). If any of the variables can not be find as part of a component this function @@ -94,8 +95,8 @@ class DeviceModel { T get_value(const ComponentVariable& component_variable, const AttributeEnum& attribute_enum = AttributeEnum::Actual) { std::string value; - const auto response = this->request_value_internal(component_variable.component, - component_variable.variable.value(), attribute_enum,value, true); + const auto response = this->request_value_internal( + component_variable.component, component_variable.variable.value(), attribute_enum, value, true); if (response == GetVariableStatusEnum::Accepted) { return to_specific_type(value); } else { @@ -117,8 +118,8 @@ class DeviceModel { std::optional get_optional_value(const ComponentVariable& component_variable, const AttributeEnum& attribute_enum = AttributeEnum::Actual) { std::string value; - const auto response = this->request_value_internal(component_variable.component, - component_variable.variable.value(), attribute_enum,value, true); + const auto response = this->request_value_internal( + component_variable.component, component_variable.variable.value(), attribute_enum, value, true); if (response == GetVariableStatusEnum::Accepted) { return to_specific_type(value); } else { diff --git a/lib/ocpp/v201/device_model.cpp b/lib/ocpp/v201/device_model.cpp index 69a26219c5..faddce4378 100644 --- a/lib/ocpp/v201/device_model.cpp +++ b/lib/ocpp/v201/device_model.cpp @@ -115,7 +115,7 @@ GetVariableStatusEnum DeviceModel::request_value_internal(const Component& compo // only internal functions can access WriteOnly variables if (attribute_opt.value().mutability.has_value() && !allow_write_only && - attribute_opt.value().mutability.value() == MutabilityEnum::WriteOnly ) { + attribute_opt.value().mutability.value() == MutabilityEnum::WriteOnly) { return GetVariableStatusEnum::Rejected; }