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/pdfinput/pdf-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/pdfinput/pdf-input.cpp')
| -rw-r--r-- | src/extension/internal/pdfinput/pdf-input.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp index 552051eed..d078b5a9b 100644 --- a/src/extension/internal/pdfinput/pdf-input.cpp +++ b/src/extension/internal/pdfinput/pdf-input.cpp @@ -357,7 +357,7 @@ PdfImportDialog::PdfImportDialog(PDFDoc *doc, const gchar */*uri*/) _preview_height = 300; // Init preview - _thumb_data = NULL; + _thumb_data = nullptr; _pageNumberSpin_adj->set_value(1.0); _current_page = 1; _setPreviewPage(_current_page); @@ -594,7 +594,7 @@ void PdfImportDialog::_setPreviewPage(int page) { if (!_render_thumb) { if (_thumb_data) { gfree(_thumb_data); - _thumb_data = NULL; + _thumb_data = nullptr; } if (!_previewed_page->loadThumb(&_thumb_data, &_thumb_width, &_thumb_height, &_thumb_rowstride)) { @@ -714,7 +714,7 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) { // poppler does not use glib g_open. So on win32 we must use unicode call. code was copied from // glib gstdio.c GooString *filename_goo = new GooString(uri); - PDFDoc *pdf_doc = new PDFDoc(filename_goo, NULL, NULL, NULL); // TODO: Could ask for password + PDFDoc *pdf_doc = new PDFDoc(filename_goo, nullptr, nullptr, nullptr); // TODO: Could ask for password //delete filename_goo; #else wchar_t *wfilename = reinterpret_cast<wchar_t*>(g_utf8_to_utf16 (uri, -1, NULL, NULL, NULL)); @@ -754,17 +754,17 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) { g_message("Failed to load document from data (error %d)", error); } - return NULL; + return nullptr; } - PdfImportDialog *dlg = NULL; + PdfImportDialog *dlg = nullptr; if (INKSCAPE.use_gui()) { dlg = new PdfImportDialog(pdf_doc, uri); if (!dlg->showDialog()) { _cancelled = true; delete dlg; delete pdf_doc; - return NULL; + return nullptr; } } @@ -779,12 +779,12 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) { #endif } - SPDocument *doc = NULL; + SPDocument *doc = nullptr; bool saved = false; if(!is_importvia_poppler) { // native importer - doc = SPDocument::createNewDoc(NULL, TRUE, TRUE); + doc = SPDocument::createNewDoc(nullptr, TRUE, TRUE); saved = DocumentUndo::getUndoSensitive(doc); DocumentUndo::setUndoSensitive(doc, false); // No need to undo in this temporary document @@ -802,7 +802,7 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) { dlg->getImportSettings(prefs); // Apply crop settings - PDFRectangle *clipToBox = NULL; + PDFRectangle *clipToBox = nullptr; double crop_setting; sp_repr_get_double(prefs, "cropTo", &crop_setting); |
