Skip to content

Commit

Permalink
fix more formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Soumya Subramanya <[email protected]>
  • Loading branch information
SNSubramanya committed Jan 4, 2024
1 parent 66ee091 commit b8f3d22
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/ocpp/v201/device_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ bool DeviceModel::component_variables_match(const std::vector<ComponentVariable>

return std::find_if(
component_variables.begin(), component_variables.end(), [component_, variable_](ComponentVariable v) {
return (component_ == v.component and !v.variable.has_value()) or //if component has no variable
(component_ == v.component and v.variable.has_value() and variable_ == v.variable.value()) or //if component has variables
return (component_ == v.component and !v.variable.has_value()) or // if component has no variable
(component_ == v.component and v.variable.has_value() and
!v.variable.value().instance.has_value() and variable_.name == v.variable.value().name) or // if component has no variable instances
variable_ == v.variable.value()) or // if component has variables
(component_ == v.component and v.variable.has_value() and
!v.variable.value().instance.has_value() and
variable_.name == v.variable.value().name) or // if component has no variable instances
(!v.component.evse.has_value() and (component_.name == v.component.name) and
(component_.instance == v.component.instance) and (variable_ == v.variable)); // B08.FR.23
}) != component_variables.end();
Expand Down

0 comments on commit b8f3d22

Please sign in to comment.