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/display/canvas-bpath.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/display/canvas-bpath.cpp') diff --git a/src/display/canvas-bpath.cpp b/src/display/canvas-bpath.cpp index fc6b79b43..35f46e2ae 100644 --- a/src/display/canvas-bpath.cpp +++ b/src/display/canvas-bpath.cpp @@ -172,7 +172,7 @@ sp_canvas_bpath_point (SPCanvasItem *item, Geom::Point p, SPCanvasItem **actual_ Geom::Rect viewbox = item->canvas->getViewbox(); viewbox.expandBy (width); double dist = Geom::infinity(); - pathv_matrix_point_bbox_wind_distance(cbp->curve->get_pathvector(), cbp->affine, p, NULL, NULL, &dist, 0.5, &viewbox); + pathv_matrix_point_bbox_wind_distance(cbp->curve->get_pathvector(), cbp->affine, p, nullptr, nullptr, &dist, 0.5, &viewbox); if (dist <= 1.0) { *actual_item = item; @@ -184,10 +184,10 @@ sp_canvas_bpath_point (SPCanvasItem *item, Geom::Point p, SPCanvasItem **actual_ SPCanvasItem * sp_canvas_bpath_new (SPCanvasGroup *parent, SPCurve *curve, bool phantom_line) { - g_return_val_if_fail (parent != NULL, NULL); + g_return_val_if_fail (parent != nullptr, NULL); g_return_val_if_fail (SP_IS_CANVAS_GROUP (parent), NULL); - SPCanvasItem *item = sp_canvas_item_new (parent, SP_TYPE_CANVAS_BPATH, NULL); + SPCanvasItem *item = sp_canvas_item_new (parent, SP_TYPE_CANVAS_BPATH, nullptr); sp_canvas_bpath_set_bpath (SP_CANVAS_BPATH (item), curve, phantom_line); @@ -197,7 +197,7 @@ sp_canvas_bpath_new (SPCanvasGroup *parent, SPCurve *curve, bool phantom_line) void sp_canvas_bpath_set_bpath (SPCanvasBPath *cbp, SPCurve *curve, bool phantom_line) { - g_return_if_fail (cbp != NULL); + g_return_if_fail (cbp != nullptr); g_return_if_fail (SP_IS_CANVAS_BPATH (cbp)); cbp->phantom_line = phantom_line; @@ -215,7 +215,7 @@ sp_canvas_bpath_set_bpath (SPCanvasBPath *cbp, SPCurve *curve, bool phantom_line void sp_canvas_bpath_set_fill (SPCanvasBPath *cbp, guint32 rgba, SPWindRule rule) { - g_return_if_fail (cbp != NULL); + g_return_if_fail (cbp != nullptr); g_return_if_fail (SP_IS_CANVAS_BPATH (cbp)); cbp->fill_rgba = rgba; @@ -227,7 +227,7 @@ sp_canvas_bpath_set_fill (SPCanvasBPath *cbp, guint32 rgba, SPWindRule rule) void sp_canvas_bpath_set_stroke (SPCanvasBPath *cbp, guint32 rgba, gdouble width, SPStrokeJoinType join, SPStrokeCapType cap, double dash, double gap) { - g_return_if_fail (cbp != NULL); + g_return_if_fail (cbp != nullptr); g_return_if_fail (SP_IS_CANVAS_BPATH (cbp)); cbp->stroke_rgba = rgba; -- cgit v1.2.3