summaryrefslogtreecommitdiffstats
path: root/src/display/drawing-surface.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-surface.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 '')
-rw-r--r--src/display/drawing-surface.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/display/drawing-surface.cpp b/src/display/drawing-surface.cpp
index 2752789e2..061641015 100644
--- a/src/display/drawing-surface.cpp
+++ b/src/display/drawing-surface.cpp
@@ -42,7 +42,7 @@ using Geom::Y;
* will cover the area under the given rectangle.
*/
DrawingSurface::DrawingSurface(Geom::IntRect const &area, int device_scale)
- : _surface(NULL)
+ : _surface(nullptr)
, _origin(area.min())
, _scale(1, 1)
, _pixels(area.dimensions())
@@ -60,7 +60,7 @@ DrawingSurface::DrawingSurface(Geom::IntRect const &area, int device_scale)
* @param pixdims Pixel dimensions of the surface.
*/
DrawingSurface::DrawingSurface(Geom::Rect const &logbox, Geom::IntPoint const &pixdims, int device_scale)
- : _surface(NULL)
+ : _surface(nullptr)
, _origin(logbox.min())
, _scale(pixdims[X] / logbox.width(), pixdims[Y] / logbox.height())
, _pixels(pixdims)
@@ -163,7 +163,7 @@ DrawingSurface::dropContents()
{
if (_surface) {
cairo_surface_destroy(_surface);
- _surface = NULL;
+ _surface = nullptr;
}
}
@@ -263,7 +263,7 @@ DrawingCache::prepare()
// the area has changed, so the cache content needs to be copied
Geom::IntPoint old_origin = old_area.min();
cairo_surface_t *old_surface = _surface;
- _surface = NULL;
+ _surface = nullptr;
_pixels = _pending_area.dimensions();
_origin = _pending_area.min();