diff options
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-06-15 10:46:15 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2018-06-18 12:27:01 +0000 |
| commit | f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43 (patch) | |
| tree | 7c6044fd3a17a2665841959dac9b3b2110b27924 /src/ui/dialog/dialog-manager.cpp | |
| parent | Run clang-tidy’s modernize-use-override pass. (diff) | |
| download | inkscape-f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43.tar.gz inkscape-f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43.zip | |
Run clang-tidy’s modernize-use-nullptr pass.
This replaces all NULL or 0 with nullptr when assigned to or returned as
a pointer.
Diffstat (limited to 'src/ui/dialog/dialog-manager.cpp')
| -rw-r--r-- | src/ui/dialog/dialog-manager.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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; } } |
