]> sigrok.org Git - pulseview.git/commitdiff
Include suggested changes by clang-tidy
authorSoeren Apel <redacted>
Thu, 13 Sep 2018 18:10:01 +0000 (20:10 +0200)
committerSoeren Apel <redacted>
Thu, 13 Sep 2018 18:10:01 +0000 (20:10 +0200)
main.cpp
pv/logging.cpp

index ce1257300383e30fe1b6daa8893820737699cac4..dc3f739f25cdac5451502ca2e3462cf7acc93df6 100644 (file)
--- 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;
index b04bd9480ac717b82f34674b53d6c50edc9d3ea0..377011b68c928a40cf1cf14c590a220ea9ac6ece 100644 (file)
@@ -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);