From 1f2082e20445966624f6172ebefd53fb1a021164 Mon Sep 17 00:00:00 2001 From: Soeren Apel Date: Thu, 13 Sep 2018 20:10:01 +0200 Subject: [PATCH] Include suggested changes by clang-tidy --- main.cpp | 4 ++-- pv/logging.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main.cpp b/main.cpp index ce12573..dc3f739 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 b04bd94..377011b 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); -- 2.30.2