summaryrefslogtreecommitdiffstats
path: root/src/display/drawing-shape.cpp
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-06-15 10:46:15 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2018-06-18 12:27:01 +0000
commitf4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43 (patch)
tree7c6044fd3a17a2665841959dac9b3b2110b27924 /src/display/drawing-shape.cpp
parentRun clang-tidy’s modernize-use-override pass. (diff)
downloadinkscape-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/display/drawing-shape.cpp')
-rw-r--r--src/display/drawing-shape.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp
index d7329e670..63db9475d 100644
--- a/src/display/drawing-shape.cpp
+++ b/src/display/drawing-shape.cpp
@@ -33,8 +33,8 @@ namespace Inkscape {
DrawingShape::DrawingShape(Drawing &drawing)
: DrawingItem(drawing)
- , _curve(NULL)
- , _last_pick(NULL)
+ , _curve(nullptr)
+ , _last_pick(nullptr)
, _repick_after(0)
{}
@@ -51,7 +51,7 @@ DrawingShape::setPath(SPCurve *curve)
if (_curve) {
_curve->unref();
- _curve = NULL;
+ _curve = nullptr;
}
if (curve) {
_curve = curve;
@@ -312,15 +312,15 @@ DrawingShape::_pickItem(Geom::Point const &p, double delta, unsigned flags)
if (_repick_after > 0) // we are a slow, huge path
return _last_pick; // skip this pick, returning what was returned last time
- if (!_curve) return NULL;
- if (!_style) return NULL;
+ if (!_curve) return nullptr;
+ if (!_style) return nullptr;
bool outline = _drawing.outline();
bool pick_as_clip = flags & PICK_AS_CLIP;
if (SP_SCALE24_TO_FLOAT(_style->opacity.value) == 0 && !outline && !pick_as_clip)
// fully transparent, no pick unless outline mode
- return NULL;
+ return nullptr;
GTimeVal tstart, tfinish;
g_get_current_time (&tstart);
@@ -351,9 +351,9 @@ DrawingShape::_pickItem(Geom::Point const &p, double delta, unsigned flags)
if (_drawing.arena()) {
Geom::Rect viewbox = _drawing.arena()->item.canvas->getViewbox();
viewbox.expandBy (width);
- pathv_matrix_point_bbox_wind_distance(_curve->get_pathvector(), _ctm, p, NULL, needfill? &wind : NULL, &dist, 0.5, &viewbox);
+ pathv_matrix_point_bbox_wind_distance(_curve->get_pathvector(), _ctm, p, nullptr, needfill? &wind : nullptr, &dist, 0.5, &viewbox);
} else {
- pathv_matrix_point_bbox_wind_distance(_curve->get_pathvector(), _ctm, p, NULL, needfill? &wind : NULL, &dist, 0.5, NULL);
+ pathv_matrix_point_bbox_wind_distance(_curve->get_pathvector(), _ctm, p, nullptr, needfill? &wind : nullptr, &dist, 0.5, nullptr);
}
g_get_current_time (&tfinish);
@@ -397,8 +397,8 @@ DrawingShape::_pickItem(Geom::Point const &p, double delta, unsigned flags)
}
}
- _last_pick = NULL;
- return NULL;
+ _last_pick = nullptr;
+ return nullptr;
}
bool