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/extension/input.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/extension/input.cpp') diff --git a/src/extension/input.cpp b/src/extension/input.cpp index 862d4a4d3..3fb330998 100644 --- a/src/extension/input.cpp +++ b/src/extension/input.cpp @@ -38,21 +38,21 @@ namespace Extension { */ Input::Input (Inkscape::XML::Node * in_repr, Implementation::Implementation * in_imp) : Extension(in_repr, in_imp) { - mimetype = NULL; - extension = NULL; - filetypename = NULL; - filetypetooltip = NULL; - output_extension = NULL; + mimetype = nullptr; + extension = nullptr; + filetypename = nullptr; + filetypetooltip = nullptr; + output_extension = nullptr; - if (repr != NULL) { + if (repr != nullptr) { Inkscape::XML::Node * child_repr; child_repr = repr->firstChild(); - while (child_repr != NULL) { + while (child_repr != nullptr) { if (!strcmp(child_repr->name(), INKSCAPE_EXTENSION_NS "input")) { child_repr = child_repr->firstChild(); - while (child_repr != NULL) { + while (child_repr != nullptr) { char const * chname = child_repr->name(); if (!strncmp(chname, INKSCAPE_EXTENSION_NS_NC, strlen(INKSCAPE_EXTENSION_NS_NC))) { chname += strlen(INKSCAPE_EXTENSION_NS); @@ -119,9 +119,9 @@ Input::~Input (void) bool Input::check (void) { - if (extension == NULL) + if (extension == nullptr) return FALSE; - if (mimetype == NULL) + if (mimetype == nullptr) return FALSE; return Extension::check(); @@ -144,7 +144,7 @@ Input::open (const gchar *uri) set_state(Extension::STATE_LOADED); } if (!loaded()) { - return NULL; + return nullptr; } timer->touch(); @@ -184,7 +184,7 @@ Input::get_extension(void) gchar * Input::get_filetypename(void) { - if (filetypename != NULL) + if (filetypename != nullptr) return filetypename; else return get_name(); @@ -218,7 +218,7 @@ Input::prefs (const gchar *uri) Gtk::Widget * controls; controls = imp->prefs_input(this, uri); - if (controls == NULL) { + if (controls == nullptr) { // std::cout << "No preferences for Input" << std::endl; return true; } -- cgit v1.2.3