From f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 15 Jun 2018 12:46:15 +0200 Subject: =?UTF-8?q?Run=20clang-tidy=E2=80=99s=20modernize-use-nullptr=20pa?= =?UTF-8?q?ss.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This replaces all NULL or 0 with nullptr when assigned to or returned as a pointer. --- src/ui/dialog/dialog-manager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ui/dialog/dialog-manager.cpp') diff --git a/src/ui/dialog/dialog-manager.cpp b/src/ui/dialog/dialog-manager.cpp index 0a4a774e6..5a10cf890 100644 --- a/src/ui/dialog/dialog-manager.cpp +++ b/src/ui/dialog/dialog-manager.cpp @@ -208,7 +208,7 @@ DialogManager &DialogManager::getInstance() /* Use singleton behavior for floating dialogs */ if (dialogs_type == FLOATING) { - static DialogManager *instance = 0; + static DialogManager *instance = nullptr; if (!instance) instance = new DialogManager(); @@ -252,7 +252,7 @@ Dialog *DialogManager::getDialog(GQuark name) { DialogMap::iterator dialog_found; dialog_found = _dialog_map.find(name); - Dialog *dialog=NULL; + Dialog *dialog=nullptr; if ( dialog_found != _dialog_map.end() ) { dialog = dialog_found->second; } else { @@ -280,14 +280,14 @@ void DialogManager::showDialog(gchar const *name, bool grabfocus) { */ void DialogManager::showDialog(GQuark name, bool /*grabfocus*/) { bool wantTiming = Inkscape::Preferences::get()->getBool("/dialogs/debug/trackAppear", false); - GTimer *timer = (wantTiming) ? g_timer_new() : 0; // if needed, must be created/started before getDialog() + GTimer *timer = (wantTiming) ? g_timer_new() : nullptr; // if needed, must be created/started before getDialog() Dialog *dialog = getDialog(name); if ( dialog ) { if ( wantTiming ) { gchar const * nameStr = g_quark_to_string(name); ege::AppearTimeTracker *tracker = new ege::AppearTimeTracker(timer, dialog->gobj(), nameStr); tracker->setAutodelete(true); - timer = 0; + timer = nullptr; } // should check for grabfocus, but lp:1348927 prevents it dialog->present(); @@ -295,7 +295,7 @@ void DialogManager::showDialog(GQuark name, bool /*grabfocus*/) { if ( timer ) { g_timer_destroy(timer); - timer = 0; + timer = nullptr; } } -- cgit v1.2.3