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/tools/spray-tool.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/tools/spray-tool.cpp')
| -rw-r--r-- | src/ui/tools/spray-tool.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ui/tools/spray-tool.cpp b/src/ui/tools/spray-tool.cpp index 603d5e80a..ebfc10d8a 100644 --- a/src/ui/tools/spray-tool.cpp +++ b/src/ui/tools/spray-tool.cpp @@ -154,7 +154,7 @@ SprayTool::SprayTool() , is_drawing(false) , is_dilating(false) , has_dilated(false) - , dilate_area(NULL) + , dilate_area(nullptr) , no_overlap(false) , picker(false) , pick_center(true) @@ -184,13 +184,13 @@ SprayTool::~SprayTool() { if (this->dilate_area) { sp_canvas_item_destroy(this->dilate_area); - this->dilate_area = NULL; + this->dilate_area = nullptr; } } void SprayTool::update_cursor(bool /*with_shift*/) { guint num = 0; - gchar *sel_message = NULL; + gchar *sel_message = nullptr; if (!desktop->selection->isEmpty()) { num = (guint) boost::distance(desktop->selection->items()); @@ -418,7 +418,7 @@ static void random_position(double &radius, double &angle, double &a, double &s, } static void sp_spray_transform_path(SPItem * item, Geom::Path &path, Geom::Affine affine, Geom::Point center){ - path *= i2anc_affine(static_cast<SPItem *>(item->parent), NULL).inverse(); + path *= i2anc_affine(static_cast<SPItem *>(item->parent), nullptr).inverse(); path *= item->transform.inverse(); Geom::Affine dt2p; if (item->parent) { @@ -429,7 +429,7 @@ static void sp_spray_transform_path(SPItem * item, Geom::Path &path, Geom::Affin } Geom::Affine i2dt = item->i2dt_affine() * Geom::Translate(center).inverse() * affine * Geom::Translate(center); path *= i2dt * dt2p; - path *= i2anc_affine(static_cast<SPItem *>(item->parent), NULL); + path *= i2anc_affine(static_cast<SPItem *>(item->parent), nullptr); } /** @@ -1144,13 +1144,13 @@ static bool sp_spray_dilate(SprayTool *tc, Geom::Point /*event_p*/, Geom::Point for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end(); ++i){ SPItem *item = *i; - g_assert(item != NULL); + g_assert(item != nullptr); sp_object_ref(item); } for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end(); ++i){ SPItem *item = *i; - g_assert(item != NULL); + g_assert(item != nullptr); if (sp_spray_recursive(desktop , set , item @@ -1194,7 +1194,7 @@ static bool sp_spray_dilate(SprayTool *tc, Geom::Point /*event_p*/, Geom::Point for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end(); ++i){ SPItem *item = *i; - g_assert(item != NULL); + g_assert(item != nullptr); sp_object_unref(item); } } |
