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/tools/spray-tool.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/ui/tools/spray-tool.cpp') 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(item->parent), NULL).inverse(); + path *= i2anc_affine(static_cast(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(item->parent), NULL); + path *= i2anc_affine(static_cast(item->parent), nullptr); } /** @@ -1144,13 +1144,13 @@ static bool sp_spray_dilate(SprayTool *tc, Geom::Point /*event_p*/, Geom::Point for(std::vector::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::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::const_iterator i=items.begin();i!=items.end(); ++i){ SPItem *item = *i; - g_assert(item != NULL); + g_assert(item != nullptr); sp_object_unref(item); } } -- cgit v1.2.3