@@ -389,7 +389,7 @@ void Provisioning::handle_set_network_profile_req(Call<SetNetworkProfileRequest>
389
389
390
390
int index_to_override = -1 ;
391
391
int index = 0 ;
392
- for (const SetNetworkProfileRequest network_profile : network_connection_profiles) {
392
+ for (const SetNetworkProfileRequest& network_profile : network_connection_profiles) {
393
393
if (network_profile.configurationSlot == msg.configurationSlot ) {
394
394
index_to_override = index ;
395
395
}
@@ -515,7 +515,7 @@ void Provisioning::handle_reset_req(Call<ResetRequest> call) {
515
515
}
516
516
517
517
void Provisioning::handle_variable_changed (const SetVariableData& set_variable_data) {
518
- ComponentVariable component_variable = {set_variable_data.component , std::nullopt, set_variable_data. variable };
518
+ ComponentVariable component_variable = {set_variable_data.component , set_variable_data. variable , std::nullopt};
519
519
520
520
if (set_variable_data.attributeType .has_value () and
521
521
set_variable_data.attributeType .value () != AttributeEnum::Actual) {
@@ -602,7 +602,7 @@ void Provisioning::handle_variables_changed(const std::map<SetVariableData, SetV
602
602
}
603
603
604
604
bool Provisioning::validate_set_variable (const SetVariableData& set_variable_data) {
605
- ComponentVariable cv = {set_variable_data.component , std::nullopt, set_variable_data. variable };
605
+ ComponentVariable cv = {set_variable_data.component , set_variable_data. variable , std::nullopt};
606
606
if (cv == ControllerComponentVariables::NetworkConfigurationPriority) {
607
607
const auto network_configuration_priorities = ocpp::split_string (set_variable_data.attributeValue .get (), ' ,' );
608
608
const auto active_security_profile =
@@ -611,7 +611,7 @@ bool Provisioning::validate_set_variable(const SetVariableData& set_variable_dat
611
611
try {
612
612
const auto network_connection_profiles = json::parse (
613
613
this ->device_model .get_value <std::string>(ControllerComponentVariables::NetworkConnectionProfiles));
614
- for (const auto configuration_slot : network_configuration_priorities) {
614
+ for (const auto & configuration_slot : network_configuration_priorities) {
615
615
auto network_profile_it =
616
616
std::find_if (network_connection_profiles.begin (), network_connection_profiles.end (),
617
617
[configuration_slot](const SetNetworkProfileRequest& network_profile) {
0 commit comments