diff options
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-06-15 10:46:15 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2018-06-18 12:27:01 +0000 |
| commit | f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43 (patch) | |
| tree | 7c6044fd3a17a2665841959dac9b3b2110b27924 /src/ui/cache | |
| parent | Run clang-tidy’s modernize-use-override pass. (diff) | |
| download | inkscape-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/ui/cache')
| -rw-r--r-- | src/ui/cache/svg_preview_cache.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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); |
