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/id-clash.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/id-clash.cpp')
| -rw-r--r-- | src/id-clash.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/id-clash.cpp b/src/id-clash.cpp index 146eeb2b5..5aafee6aa 100644 --- a/src/id-clash.cpp +++ b/src/id-clash.cpp @@ -104,7 +104,7 @@ find_references(SPObject *elem, refmap_type &refmap) if (css) { for (unsigned i = 0; i < NUM_CLIPBOARD_PROPERTIES; ++i) { const char *attr = clipboard_properties[i]; - const gchar *value = sp_repr_css_property(css, attr, NULL); + const gchar *value = sp_repr_css_property(css, attr, nullptr); if (value) { gchar *uri = extract_uri(value); if (uri && uri[0] == '#') { @@ -227,8 +227,8 @@ change_clashing_ids(SPDocument *imported_doc, SPDocument *current_doc, for (;;) { new_id += "0123456789"[std::rand() % 10]; const char *str = new_id.c_str(); - if (current_doc->getObjectById(str) == NULL && - imported_doc->getObjectById(str) == NULL) break; + if (current_doc->getObjectById(str) == nullptr && + imported_doc->getObjectById(str) == nullptr) break; } // Change to the new ID @@ -393,7 +393,7 @@ void rename_id(SPObject *elem, Glib::ustring const &new_name) new_name2 += '-'; for (;;) { new_name2 += "0123456789"[std::rand() % 10]; - if (current_doc->getObjectById(new_name2) == NULL) + if (current_doc->getObjectById(new_name2) == nullptr) break; } } |
