@@ -2283,24 +2283,23 @@ void configuration_impl::load_eventgroup(
22832283 }
22842284 its_converter >> its_eventgroup->id_ ;
22852285 } else if (its_key == " is_multicast" ) {
2286- std::string its_value (j->second .data ());
2287- if (its_value == " true" ) {
2286+ std::string its_value_inner (j->second .data ());
2287+ if (its_value_inner == " true" ) {
22882288 its_eventgroup->multicast_address_ = _service->multicast_address_ ;
22892289 its_eventgroup->multicast_port_ = _service->multicast_port_ ;
22902290 }
22912291 } else if (its_key == " multicast" ) {
22922292 try {
2293- std::string its_value = j->second .get_child (" address" ).data ();
2294- its_eventgroup->multicast_address_ = its_value ;
2295- its_value = j->second .get_child (" port" ).data ();
2296- its_converter << its_value ;
2293+ std::string its_value_inner = j->second .get_child (" address" ).data ();
2294+ its_eventgroup->multicast_address_ = its_value_inner ;
2295+ its_value_inner = j->second .get_child (" port" ).data ();
2296+ its_converter << its_value_inner ;
22972297 its_converter >> its_eventgroup->multicast_port_ ;
22982298 } catch (...) {
22992299 // intentionally left empty
23002300 }
23012301 } else if (its_key == " threshold" ) {
23022302 int its_threshold (0 );
2303- std::stringstream its_converter;
23042303 its_converter << std::dec << its_value;
23052304 its_converter >> std::dec >> its_threshold;
23062305 its_eventgroup->threshold_ =
@@ -2309,13 +2308,12 @@ void configuration_impl::load_eventgroup(
23092308 static_cast <uint8_t >(its_threshold);
23102309 } else if (its_key == " events" ) {
23112310 for (auto k = j->second .begin (); k != j->second .end (); ++k) {
2312- std::stringstream its_converter;
2313- std::string its_value (k->second .data ());
2311+ std::string its_value_inner (k->second .data ());
23142312 event_t its_event_id (0 );
2315- if (its_value .size () > 1 && its_value [0 ] == ' 0' && its_value [1 ] == ' x' ) {
2316- its_converter << std::hex << its_value ;
2313+ if (its_value_inner .size () > 1 && its_value_inner [0 ] == ' 0' && its_value_inner [1 ] == ' x' ) {
2314+ its_converter << std::hex << its_value_inner ;
23172315 } else {
2318- its_converter << std::dec << its_value ;
2316+ its_converter << std::dec << its_value_inner ;
23192317 }
23202318 its_converter >> its_event_id;
23212319 if (0 < its_event_id) {
@@ -3565,7 +3563,6 @@ bool configuration_impl::find_specific_port(uint16_t &_port, service_t _service,
35653563 std::map<bool , std::set<uint16_t > > &_used_client_ports) const {
35663564 bool is_configured (false );
35673565 bool check_all (false );
3568- std::list<std::shared_ptr<client>>::const_iterator it;
35693566 auto its_client = find_client (_service, _instance);
35703567
35713568 // Check for service, instance specific port configuration
@@ -3594,7 +3591,7 @@ bool configuration_impl::find_specific_port(uint16_t &_port, service_t _service,
35943591 << " service: " << std::hex << _service
35953592 << " instance: " << _instance
35963593 << " reliable: " << std::dec << _reliable
3597- << " return specific port: " << ( uint32_t ) _port;
3594+ << " return specific port: " << static_cast < uint32_t >( _port) ;
35983595 return true ;
35993596 }
36003597 ++it;
@@ -3611,7 +3608,7 @@ bool configuration_impl::find_specific_port(uint16_t &_port, service_t _service,
36113608 << " service: " << std::hex << _service
36123609 << " instance: " << _instance
36133610 << " reliable: " << std::dec << _reliable
3614- << " return specific port: " << ( uint32_t ) _port;
3611+ << " return specific port: " << static_cast < uint32_t >( _port) ;
36153612 return true ;
36163613 }
36173614 }
@@ -4395,25 +4392,25 @@ void configuration_impl::load_acceptance_data(const boost::property_tree::ptree&
43954392 port_type_e its_type (port_type_e::PT_OPTIONAL);
43964393
43974394 for (const auto & range : p.second ) {
4398- const std::string its_key (range.first );
4399- const std::string its_value (range.second .data ());
4400- if (its_key == " first" || its_key == " last" || its_key == " port" ) {
4401- its_converter << std::dec << its_value ;
4395+ const std::string its_key_inner (range.first );
4396+ const std::string its_value_inner (range.second .data ());
4397+ if (its_key_inner == " first" || its_key_inner == " last" || its_key_inner == " port" ) {
4398+ its_converter << std::dec << its_value_inner ;
44024399 std::uint16_t its_port_value (0 );
44034400 its_converter >> its_port_value;
44044401 its_converter.str (" " );
44054402 its_converter.clear ();
4406- if (its_key == " first" ) {
4403+ if (its_key_inner == " first" ) {
44074404 its_first = its_port_value;
4408- } else if (its_key == " last" ) {
4405+ } else if (its_key_inner == " last" ) {
44094406 its_last = its_port_value;
4410- } else if (its_key == " port" ) {
4407+ } else if (its_key_inner == " port" ) {
44114408 its_first = its_last = its_port_value;
44124409 }
4413- } else if (its_key == " type" ) {
4414- if (its_value == " secure" ) {
4410+ } else if (its_key_inner == " type" ) {
4411+ if (its_value_inner == " secure" ) {
44154412 its_type = port_type_e::PT_SECURE;
4416- } else if (its_value == " optional" ) {
4413+ } else if (its_value_inner == " optional" ) {
44174414 its_type = port_type_e::PT_OPTIONAL;
44184415 } else {
44194416 its_type = port_type_e::PT_UNKNOWN;
@@ -4604,17 +4601,17 @@ void configuration_impl::load_someip_tp_for_service(
46044601 const std::string its_value (method.second .data ());
46054602 if (its_value.empty ()) {
46064603 for (const auto &its_data : method.second ) {
4607- const std::string its_value (its_data.second .data ());
4608- if (!its_value .empty ()) {
4604+ const std::string its_value_inner (its_data.second .data ());
4605+ if (!its_value_inner .empty ()) {
46094606 if (its_data.first == " method" ) {
4610- if (its_value .size () > 1 && its_value [0 ] == ' 0' && its_value [1 ] == ' x' ) {
4611- its_converter << std::hex << its_value ;
4607+ if (its_value_inner .size () > 1 && its_value_inner [0 ] == ' 0' && its_value_inner [1 ] == ' x' ) {
4608+ its_converter << std::hex << its_value_inner ;
46124609 } else {
4613- its_converter << std::dec << its_value ;
4610+ its_converter << std::dec << its_value_inner ;
46144611 }
46154612 its_converter >> its_method;
46164613 } else if (its_data.first == " max-segment-length" ) {
4617- its_converter << std::dec << its_value ;
4614+ its_converter << std::dec << its_value_inner ;
46184615 its_converter >> its_max_segment_length;
46194616
46204617 // Segment length must be multiple of 16
@@ -4628,7 +4625,7 @@ void configuration_impl::load_someip_tp_for_service(
46284625 its_max_segment_length = std::uint16_t (its_max_segment_length - its_rest);
46294626 }
46304627 } else if (its_data.first == " separation-time" ) {
4631- its_converter << std::dec << its_value ;
4628+ its_converter << std::dec << its_value_inner ;
46324629 its_converter >> its_separation_time;
46334630 its_separation_time *= std::uint32_t (1000 );
46344631 }
@@ -4998,11 +4995,11 @@ void configuration_impl::set_sd_acceptance_rule(
49984995 sd_acceptance_rules_active_.insert (_address);
49994996 }
50004997
5001- const auto found_reliability = found_address->second .second .find (_reliable);
4998+ const auto found_reliability_inner = found_address->second .second .find (_reliable);
50024999 VSOMEIP_INFO << " ipsec:acceptance:" << _address << " [" << _path << " ]"
50035000 << " :" << (_reliable ? " tcp" : " udp" ) << " : using default ranges "
5004- << found_reliability ->second .first << " "
5005- << found_reliability ->second .second ;
5001+ << found_reliability_inner ->second .first << " "
5002+ << found_reliability_inner ->second .second ;
50065003 }
50075004 } else if (_enable) {
50085005 boost::icl::interval_set<std::uint16_t > its_optional_default;
@@ -5034,14 +5031,14 @@ void configuration_impl::set_sd_acceptance_rule(
50345031 sd_acceptance_rules_active_.insert (_address);
50355032 }
50365033
5037- const auto found_address = sd_acceptance_rules_.find (_address);
5038- if (found_address != sd_acceptance_rules_.end ()) {
5039- const auto found_reliability = found_address ->second .second .find (_reliable);
5040- if (found_reliability != found_address ->second .second .end ()) {
5041- VSOMEIP_INFO << " ipsec:acceptance:" << _address << " [ " << _path << " ] "
5034+ const auto found_address_inner = sd_acceptance_rules_.find (_address);
5035+ if (found_address_inner != sd_acceptance_rules_.end ()) {
5036+ const auto found_reliability_inner = found_address_inner ->second .second .find (_reliable);
5037+ if (found_reliability_inner != found_address_inner ->second .second .end ()) {
5038+ VSOMEIP_INFO << " ipsec:acceptance:" << _address
50425039 << " :" << (_reliable ? " tcp" : " udp" ) << " : using default ranges "
5043- << found_reliability ->second .first << " "
5044- << found_reliability ->second .second ;
5040+ << found_reliability_inner ->second .first << " "
5041+ << found_reliability_inner ->second .second ;
50455042 }
50465043 }
50475044 }
0 commit comments