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/live_effects/lpe-perspective_path.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/live_effects/lpe-perspective_path.cpp')
| -rw-r--r-- | src/live_effects/lpe-perspective_path.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp index 0387e52ba..857bd2952 100644 --- a/src/live_effects/lpe-perspective_path.cpp +++ b/src/live_effects/lpe-perspective_path.cpp @@ -73,7 +73,7 @@ void LPEPerspectivePath::doOnApply(SPLPEItem const* lpeitem) { Persp3D *persp = persp3d_document_first_persp(lpeitem->document); - if(persp == 0 ){ + if(persp == nullptr ){ char *msg = _("You need a BOX 3D object"); Gtk::MessageDialog dialog(msg, false, Gtk::MESSAGE_INFO, Gtk::BUTTONS_OK, true); @@ -88,7 +88,7 @@ LPEPerspectivePath::doBeforeEffect (SPLPEItem const* lpeitem) original_bbox(lpeitem, true); SPLPEItem * item = const_cast<SPLPEItem*>(lpeitem); Persp3D *persp = persp3d_document_first_persp(lpeitem->document); - if(persp == 0 ){ + if(persp == nullptr ){ char *msg = _("You need a BOX 3D object"); Gtk::MessageDialog dialog(msg, false, Gtk::MESSAGE_INFO, Gtk::BUTTONS_OK, true); @@ -103,10 +103,10 @@ LPEPerspectivePath::doBeforeEffect (SPLPEItem const* lpeitem) void LPEPerspectivePath::refresh(Gtk::Entry* perspective) { perspectiveID = perspective->get_text(); - Persp3D *first = 0; - Persp3D *persp = 0; + Persp3D *first = nullptr; + Persp3D *persp = nullptr; for (auto& child: lpeobj->document->getDefs()->children) { - if (SP_IS_PERSP3D(&child) && first == 0) { + if (SP_IS_PERSP3D(&child) && first == nullptr) { first = SP_PERSP3D(&child); } if (SP_IS_PERSP3D(&child) && strcmp(child.getId(), const_cast<const gchar *>(perspectiveID.c_str())) == 0) { @@ -114,14 +114,14 @@ void LPEPerspectivePath::refresh(Gtk::Entry* perspective) { break; } } - if(first == 0 ){ + if(first == nullptr ){ char *msg = _("You need a BOX 3D object"); Gtk::MessageDialog dialog(msg, false, Gtk::MESSAGE_INFO, Gtk::BUTTONS_OK, true); dialog.run(); return; } - if(persp == 0){ + if(persp == nullptr){ persp = first; char *msg = _("First perspective selected"); Gtk::MessageDialog dialog(msg, false, Gtk::MESSAGE_INFO, @@ -263,7 +263,7 @@ LPEPerspectivePath::newWidget() void LPEPerspectivePath::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) { KnotHolderEntity *e = new PP::KnotHolderEntityOffset(this); - e->create( NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, + e->create( nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Adjust the origin") ); knotholder->add(e); }; |
