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/drawing-surface.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/display/drawing-surface.cpp') 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(); -- cgit v1.2.3