diff --git a/app/mon/mon_gui/src/ecalmon.cpp b/app/mon/mon_gui/src/ecalmon.cpp index 4978f23fa4..801de081cf 100644 --- a/app/mon/mon_gui/src/ecalmon.cpp +++ b/app/mon/mon_gui/src/ecalmon.cpp @@ -93,8 +93,8 @@ Ecalmon::Ecalmon(QWidget *parent) network_mode_warning_icon_->setPixmap(warning_icon); network_mode_warning_icon_->setVisible(false); - bool network_mode = eCAL::Config::GetCurrentConfig().transport_layer_options.network_enabled; - int multicast_ttl = eCAL::Config::GetCurrentConfig().transport_layer_options.mc_options.ttl; + const bool network_mode = eCAL::Config::GetCurrentConfig().transport_layer_options.network_enabled; + const int multicast_ttl = eCAL::Config::GetCurrentConfig().transport_layer_options.mc_options.ttl; if (network_mode) { diff --git a/app/rec/rec_client_core/src/job/record_job.cpp b/app/rec/rec_client_core/src/job/record_job.cpp index 8bbd285d70..b8443943dd 100644 --- a/app/rec/rec_client_core/src/job/record_job.cpp +++ b/app/rec/rec_client_core/src/job/record_job.cpp @@ -171,7 +171,7 @@ namespace eCAL #undef CopyFile #endif // CopyFile { - std::string ecal_ini_original_path = Config::GetCurrentConfig().loaded_ecal_ini_file; + const std::string ecal_ini_original_path = Config::GetCurrentConfig().loaded_ecal_ini_file; if (ecal_ini_original_path.empty()) { diff --git a/app/sys/sys_gui/src/widgets/import_from_cloud_widget/import_from_cloud_widget.cpp b/app/sys/sys_gui/src/widgets/import_from_cloud_widget/import_from_cloud_widget.cpp index b8e0cda663..86fc04dd44 100644 --- a/app/sys/sys_gui/src/widgets/import_from_cloud_widget/import_from_cloud_widget.cpp +++ b/app/sys/sys_gui/src/widgets/import_from_cloud_widget/import_from_cloud_widget.cpp @@ -927,7 +927,7 @@ void ImportFromCloudWidget::loadExcludeTasksFilter() QFile default_cfg_file(default_cfg_file_path.c_str()); if (default_cfg_file.exists()) { - std::regex reg(eCAL::Config::GetCurrentConfig().application_options.sys_options.filter_excl, std::regex::icase); + const std::regex reg(eCAL::Config::GetCurrentConfig().application_options.sys_options.filter_excl, std::regex::icase); exclude_tasks_regex_valid_ = !eCAL::Config::GetCurrentConfig().application_options.sys_options.filter_excl.empty(); exclude_tasks_regex_ = reg; } diff --git a/ecal/core/include/ecal/types/ecal_custom_data_types.h b/ecal/core/include/ecal/types/ecal_custom_data_types.h index 275dfc9d46..47eadf4158 100644 --- a/ecal/core/include/ecal/types/ecal_custom_data_types.h +++ b/ecal/core/include/ecal/types/ecal_custom_data_types.h @@ -53,7 +53,7 @@ namespace eCAL private: ECAL_API void validateIpString(const std::string& ip_address_); - void exitApp(const std::string& ip_adress_ = std::string("")); + void exitApp(const std::string& ip_address_ = std::string("")); std::string m_ip_address; }; diff --git a/ecal/core/src/config/ecal_cmd_parser.cpp b/ecal/core/src/config/ecal_cmd_parser.cpp index 26cbcd00fd..ac6c895efb 100644 --- a/ecal/core/src/config/ecal_cmd_parser.cpp +++ b/ecal/core/src/config/ecal_cmd_parser.cpp @@ -62,8 +62,6 @@ namespace eCAL } } - CmdParser::~CmdParser() - { - } + CmdParser::~CmdParser() = default; } } diff --git a/ecal/core/src/config/ecal_config_initializer.cpp b/ecal/core/src/config/ecal_config_initializer.cpp index bed6e4b00a..13d7fb361b 100644 --- a/ecal/core/src/config/ecal_config_initializer.cpp +++ b/ecal/core/src/config/ecal_config_initializer.cpp @@ -44,7 +44,8 @@ namespace { void tokenize(const std::string& str, std::vector& tokens, const std::string& delimiters = " ", bool trimEmpty = false) { - std::string::size_type pos, lastPos = 0; + std::string::size_type pos = 0; + std::string::size_type lastPos = 0; for (;;) { @@ -54,7 +55,7 @@ namespace { pos = str.length(); if (pos != lastPos || !trimEmpty) { - tokens.emplace_back(std::string(str.data() + lastPos, pos - lastPos)); + tokens.emplace_back(str.data() + lastPos, pos - lastPos); } break; } @@ -62,7 +63,7 @@ namespace { { if (pos != lastPos || !trimEmpty) { - tokens.emplace_back(std::string(str.data() + lastPos, pos - lastPos)); + tokens.emplace_back(str.data() + lastPos, pos - lastPos); } } lastPos = pos + 1; @@ -156,7 +157,7 @@ namespace eCAL // monitoring options auto& monitoringOptions = monitoring_options; - auto monitoringMode = iniConfig.get(EXPERIMENTAL, "shm_monitoring_enabled", false) == true ? MonitoringMode::shm_monitoring : MonitoringMode::none; + auto monitoringMode = iniConfig.get(EXPERIMENTAL, "shm_monitoring_enabled", false) ? MonitoringMode::shm_monitoring : MonitoringMode::none; monitoringOptions.monitoring_mode = static_cast(monitoringMode); monitoringOptions.monitoring_timeout = iniConfig.get(MONITORING, "timeout", MON_TIMEOUT);; monitoringOptions.network_monitoring = iniConfig.get(EXPERIMENTAL, "network_monitoring", EXP_NETWORK_MONITORING_ENABLED);