diff --git a/ecal/core/src/config/ecal_config_initializer.cpp b/ecal/core/src/config/ecal_config_initializer.cpp index 830acb3a7c..602bda36a6 100644 --- a/ecal/core/src/config/ecal_config_initializer.cpp +++ b/ecal/core/src/config/ecal_config_initializer.cpp @@ -59,6 +59,7 @@ #include #include +#include namespace { @@ -210,16 +211,16 @@ namespace std::vector ConvertArgcArgvToVector(int argc_, char** argv_) { std::vector arguments; - if (argc_ > 0 && argv_ != nullptr) + if (argv_ == nullptr) return arguments; + + for (size_t i = 0; i < static_cast(argc_); ++i) { - for (size_t i = 0; i < static_cast(argc_); ++i) + if (argv_[i] != nullptr) { - if (argv_[i] != nullptr) - { - arguments.emplace_back(argv_[i]); - } + arguments.emplace_back(argv_[i]); } } + return arguments; } } @@ -271,9 +272,7 @@ namespace eCAL InitFromFile(g_default_ini_file); } - Configuration::Configuration() - { - } + Configuration::Configuration() = default; std::string Configuration::GetYamlFilePath() { diff --git a/ecal/core/src/pubsub/config/builder/reader_attribute_builder.cpp b/ecal/core/src/pubsub/config/builder/reader_attribute_builder.cpp index f97fed54fb..2703e0a499 100644 --- a/ecal/core/src/pubsub/config/builder/reader_attribute_builder.cpp +++ b/ecal/core/src/pubsub/config/builder/reader_attribute_builder.cpp @@ -29,7 +29,7 @@ namespace eCAL attributes.network_enabled = reg_config_.network_enabled; attributes.loopback = reg_config_.loopback; attributes.drop_out_of_order_messages = sub_config_.drop_out_of_order_messages; - attributes.registation_timeout_ms = reg_config_.registration_timeout; + attributes.registration_timeout_ms = reg_config_.registration_timeout; attributes.topic_name = topic_name_; attributes.host_name = Process::GetHostName(); attributes.host_group_name = Process::GetHostGroupName(); diff --git a/ecal/core/src/readwrite/config/attributes/reader_attributes.h b/ecal/core/src/readwrite/config/attributes/reader_attributes.h index 0d8ad85e1a..117a8ddac4 100644 --- a/ecal/core/src/readwrite/config/attributes/reader_attributes.h +++ b/ecal/core/src/readwrite/config/attributes/reader_attributes.h @@ -59,7 +59,7 @@ namespace eCAL bool network_enabled; bool drop_out_of_order_messages; bool loopback; - unsigned int registation_timeout_ms; + unsigned int registration_timeout_ms; SUDPAttributes udp; STCPAttributes tcp; diff --git a/ecal/core/src/readwrite/config/builder/shm_attribute_builder.cpp b/ecal/core/src/readwrite/config/builder/shm_attribute_builder.cpp index f1b7105a74..f822810157 100644 --- a/ecal/core/src/readwrite/config/builder/shm_attribute_builder.cpp +++ b/ecal/core/src/readwrite/config/builder/shm_attribute_builder.cpp @@ -28,7 +28,7 @@ namespace eCAL SHM::SAttributes attributes; attributes.process_id = attr_.process_id; - attributes.registration_timeout_ms = attr_.registation_timeout_ms; + attributes.registration_timeout_ms = attr_.registration_timeout_ms; return attributes; }