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/extension/internal/gdkpixbuf-input.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/extension/internal/gdkpixbuf-input.cpp')
| -rw-r--r-- | src/extension/internal/gdkpixbuf-input.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index efac1a02e..ba90c747e 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -64,14 +64,14 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) } bool embed = ( link.compare( "embed" ) == 0 ); - SPDocument *doc = NULL; + SPDocument *doc = nullptr; std::unique_ptr<Inkscape::Pixbuf> pb(Inkscape::Pixbuf::create_from_file(uri)); // TODO: the pixbuf is created again from the base64-encoded attribute in SPImage. // Find a way to create the pixbuf only once. if (pb) { - doc = SPDocument::createNewDoc(NULL, TRUE, TRUE); + doc = SPDocument::createNewDoc(nullptr, TRUE, TRUE); bool saved = DocumentUndo::getUndoSensitive(doc); DocumentUndo::setUndoSensitive(doc, false); // no need to undo in this temporary document @@ -79,7 +79,7 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) double height = pb->height(); double defaultxdpi = prefs->getDouble("/dialogs/import/defaultxdpi/value", Inkscape::Util::Quantity::convert(1, "in", "px")); //bool forcexdpi = prefs->getBool("/dialogs/import/forcexdpi"); - ImageResolution *ir = 0; + ImageResolution *ir = nullptr; double xscale = 1; double yscale = 1; @@ -126,7 +126,7 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) sp_embed_image(image_node, pb.get()); } else { // convert filename to uri - gchar* _uri = g_filename_to_uri(uri, NULL, NULL); + gchar* _uri = g_filename_to_uri(uri, nullptr, nullptr); if(_uri) { image_node->setAttribute("xlink:href", _uri); g_free(_uri); @@ -174,8 +174,8 @@ GdkpixbufInput::init(void) gchar **extensions = gdk_pixbuf_format_get_extensions(pixformat); gchar **mimetypes = gdk_pixbuf_format_get_mime_types(pixformat); - for (int i = 0; extensions[i] != NULL; i++) { - for (int j = 0; mimetypes[j] != NULL; j++) { + for (int i = 0; extensions[i] != nullptr; i++) { + for (int j = 0; mimetypes[j] != nullptr; j++) { /* thanks but no thanks, we'll handle SVG extensions... */ if (strcmp(extensions[i], "svg") == 0) { |
