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/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/input.cpp')
| -rw-r--r-- | src/extension/input.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
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; } |
