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/contextmenu.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 '')
| -rw-r--r-- | src/ui/contextmenu.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ui/contextmenu.cpp b/src/ui/contextmenu.cpp index 628b0b2fd..e9ff59f36 100644 --- a/src/ui/contextmenu.cpp +++ b/src/ui/contextmenu.cpp @@ -74,7 +74,7 @@ ContextMenu::ContextMenu(SPDesktop *desktop, SPItem *item) : positionOfLastDialog = 10; // 9 in front + 1 for the separator in the next if; used to position the dialog menu entries below each other /* Item menu */ - if (item!=NULL) { + if (item!=nullptr) { AddSeparator(); MakeObjectMenu(); } @@ -126,7 +126,7 @@ ContextMenu::ContextMenu(SPDesktop *desktop, SPItem *item) : mi->show(); append(*mi);//insert(*mi,positionOfLastDialog++); /* layer menu */ - SPGroup *group=NULL; + SPGroup *group=nullptr; if (item) { if (SP_IS_GROUP(item)) { group = SP_GROUP(item); @@ -236,7 +236,7 @@ static void context_menu_item_on_my_activate(void */*object*/, SPAction *action) { if (!temporarily_block_actions) { - sp_action_perform(action, NULL); + sp_action_perform(action, nullptr); } } @@ -535,7 +535,7 @@ void ContextMenu::ItemCreateLink(void) const char *id = _item->getRepr()->attribute("id"); Inkscape::XML::Node *child = _item->getRepr()->duplicate(xml_doc); _item->deleteObject(false); - repr->addChild(child, NULL); + repr->addChild(child, nullptr); child->setAttribute("id", id); Inkscape::GC::release(repr); @@ -640,7 +640,7 @@ void ContextMenu::AnchorLinkFollow(void) if (verb) { SPAction *action = verb->get_action(Inkscape::ActionContext(_desktop)); if (action) { - sp_action_perform(action, NULL); + sp_action_perform(action, nullptr); } } } @@ -748,7 +748,7 @@ void ContextMenu::ImageEdit(void) _desktop->selection->set(_item); } - GError* errThing = 0; + GError* errThing = nullptr; Glib::ustring bmpeditor = getImageEditorName(); Glib::ustring cmdline = bmpeditor; Glib::ustring name; @@ -782,7 +782,7 @@ void ContextMenu::ImageEdit(void) if (strncmp (href,"file:",5) == 0) { // URI to filename conversion - name = g_filename_from_uri(href, NULL, NULL); + name = g_filename_from_uri(href, nullptr, nullptr); } else { name.append(href); } @@ -814,7 +814,7 @@ void ContextMenu::ImageEdit(void) g_warning("Problem launching editor (%d). %s", errThing->code, errThing->message); (_desktop->messageStack())->flash(Inkscape::ERROR_MESSAGE, errThing->message); g_error_free(errThing); - errThing = 0; + errThing = nullptr; } } @@ -840,7 +840,7 @@ void ContextMenu::ImageEmbed(void) if (verb) { SPAction *action = verb->get_action(Inkscape::ActionContext(_desktop)); if (action) { - sp_action_perform(action, NULL); + sp_action_perform(action, nullptr); } } } @@ -855,7 +855,7 @@ void ContextMenu::ImageExtract(void) if (verb) { SPAction *action = verb->get_action(Inkscape::ActionContext(_desktop)); if (action) { - sp_action_perform(action, NULL); + sp_action_perform(action, nullptr); } } } |
