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/cache/svg_preview_cache.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ui/cache/svg_preview_cache.cpp') diff --git a/src/ui/cache/svg_preview_cache.cpp b/src/ui/cache/svg_preview_cache.cpp index 829c6b0ef..0665f474f 100644 --- a/src/ui/cache/svg_preview_cache.cpp +++ b/src/ui/cache/svg_preview_cache.cpp @@ -87,9 +87,9 @@ SvgPreview::~SvgPreview() Glib::ustring SvgPreview::cache_key(gchar const *uri, gchar const *name, unsigned psize) const { Glib::ustring key; - key += (uri!=NULL) ? uri : ""; + key += (uri!=nullptr) ? uri : ""; key += ":"; - key += (name!=NULL) ? name : "unknown"; + key += (name!=nullptr) ? name : "unknown"; key += ":"; key += psize; return key; @@ -100,7 +100,7 @@ GdkPixbuf* SvgPreview::get_preview_from_cache(const Glib::ustring& key) { if ( found != _pixmap_cache.end() ) { return found->second; } - return NULL; + return nullptr; } void SvgPreview::set_preview_in_cache(const Glib::ustring& key, GdkPixbuf* px) { @@ -114,7 +114,7 @@ GdkPixbuf* SvgPreview::get_preview(const gchar* uri, const gchar* id, Inkscape:: Glib::ustring key = cache_key(uri, id, psize); GdkPixbuf* px = get_preview_from_cache(key); - if (px == NULL) { + if (px == nullptr) { /* px = render_pixbuf(root, scale_factor, dbox, psize); set_preview_in_cache(key, px); -- cgit v1.2.3