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/object/uri.cpp | |
| 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/object/uri.cpp')
| -rw-r--r-- | src/object/uri.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/object/uri.cpp b/src/object/uri.cpp index 881b322b4..91878512a 100644 --- a/src/object/uri.cpp +++ b/src/object/uri.cpp @@ -61,7 +61,7 @@ URI::Impl::Impl(xmlURIPtr uri) URI::Impl::~Impl() { if (_uri) { xmlFreeURI(_uri); - _uri = NULL; + _uri = nullptr; } } @@ -76,7 +76,7 @@ void URI::Impl::unreference() { } bool URI::Impl::isOpaque() const { - bool opq = !isRelative() && (getOpaque() != NULL); + bool opq = !isRelative() && (getOpaque() != nullptr); return opq; } @@ -136,7 +136,7 @@ const gchar *URI::Impl::getOpaque() const { gchar *URI::to_native_filename(gchar const* uri) { - gchar *filename = NULL; + gchar *filename = nullptr; URI tmp(uri); filename = tmp.toNativeFilename(); return filename; @@ -173,7 +173,7 @@ gchar *URI::toNativeFilename() const { if (isRelativePath()) { return uriString; } else { - gchar *filename = g_filename_from_uri(uriString, NULL, NULL); + gchar *filename = g_filename_from_uri(uriString, nullptr, nullptr); g_free(uriString); if (filename) { return filename; @@ -216,7 +216,7 @@ URI URI::fromUtf8( gchar const* path ) { /* TODO !!! proper error handling */ URI URI::from_native_filename(gchar const *path) { - gchar *uri = g_filename_to_uri(path, NULL, NULL); + gchar *uri = g_filename_to_uri(path, nullptr, nullptr); URI result(uri); g_free( uri ); return result; @@ -230,7 +230,7 @@ gchar *URI::Impl::toString() const { xmlFree(string); return glib_string; } else { - return NULL; + return nullptr; } } |
