From dd83f437ba829321d2d92feefefa4595338d59a7 Mon Sep 17 00:00:00 2001 From: Peguen <73380451+Peguen@users.noreply.github.com> Date: Thu, 28 Nov 2024 15:05:31 +0100 Subject: [PATCH] Some cleanups in ecal_config_initializer. --- ecal/core/src/config/ecal_config_initializer.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/ecal/core/src/config/ecal_config_initializer.cpp b/ecal/core/src/config/ecal_config_initializer.cpp index 830acb3a7c..fb4ab85f90 100644 --- a/ecal/core/src/config/ecal_config_initializer.cpp +++ b/ecal/core/src/config/ecal_config_initializer.cpp @@ -210,16 +210,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 +271,7 @@ namespace eCAL InitFromFile(g_default_ini_file); } - Configuration::Configuration() - { - } + Configuration::Configuration() = default; std::string Configuration::GetYamlFilePath() {