From: Soeren Apel Date: Thu, 13 Sep 2018 18:10:01 +0000 (+0200) Subject: Include suggested changes by clang-tidy X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=1f2082e20445966624f6172ebefd53fb1a021164 Include suggested changes by clang-tidy --- diff --git a/main.cpp b/main.cpp index ce125730..dc3f739f 100644 --- a/main.cpp +++ b/main.cpp @@ -236,7 +236,7 @@ int main(int argc, char *argv[]) break; case 'i': - open_files.push_back(optarg); + open_files.emplace_back(optarg); break; case 'I': @@ -252,7 +252,7 @@ int main(int argc, char *argv[]) argv += optind; for (int i = 0; i < argc; i++) - open_files.push_back(argv[i]); + open_files.emplace_back(argv[i]); // Prepare the global settings since logging needs them early on pv::GlobalSettings settings; diff --git a/pv/logging.cpp b/pv/logging.cpp index b04bd948..377011b6 100644 --- a/pv/logging.cpp +++ b/pv/logging.cpp @@ -53,12 +53,12 @@ Logging::~Logging() { qInstallMessageHandler(nullptr); sr_log_callback_set(prev_sr_log_cb, prev_sr_log_cb_data); - prev_sr_log_cb = NULL; - prev_sr_log_cb_data = NULL; + prev_sr_log_cb = nullptr; + prev_sr_log_cb_data = nullptr; #ifdef ENABLE_DECODE srd_log_callback_set(prev_srd_log_cb, prev_srd_log_cb_data); - prev_srd_log_cb = NULL; - prev_srd_log_cb_data = NULL; + prev_srd_log_cb = nullptr; + prev_srd_log_cb_data = nullptr; #endif GlobalSettings::remove_change_handler(this);