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/internal/metafile-print.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/extension/internal/metafile-print.cpp') diff --git a/src/extension/internal/metafile-print.cpp b/src/extension/internal/metafile-print.cpp index fb44f8499..4bb8eae32 100644 --- a/src/extension/internal/metafile-print.cpp +++ b/src/extension/internal/metafile-print.cpp @@ -89,7 +89,7 @@ bool PrintMetafile::_load_ppt_fontfix_data() //this is not called by any other return (ppt_fontfix_available = false); } - char *oldlocale = g_strdup(setlocale(LC_NUMERIC, NULL)); + char *oldlocale = g_strdup(setlocale(LC_NUMERIC, nullptr)); setlocale(LC_NUMERIC, "C"); std::string instr; @@ -271,7 +271,7 @@ void PrintMetafile::hatch_classify(char *name, int *hatchType, U_COLORREF *hatch void PrintMetafile::brush_classify(SPObject *parent, int depth, Inkscape::Pixbuf **epixbuf, int *hatchType, U_COLORREF *hatchColor, U_COLORREF *bkColor) { if (depth == 0) { - *epixbuf = NULL; + *epixbuf = nullptr; *hatchType = -1; *hatchColor = U_RGB(0, 0, 0); *bkColor = U_RGB(255, 255, 255); @@ -279,7 +279,7 @@ void PrintMetafile::brush_classify(SPObject *parent, int depth, Inkscape::Pixbuf depth++; // first look along the pattern chain, if there is one if (SP_IS_PATTERN(parent)) { - for (SPPattern *pat_i = SP_PATTERN(parent); pat_i != NULL; pat_i = pat_i->ref ? pat_i->ref->getObject() : NULL) { + for (SPPattern *pat_i = SP_PATTERN(parent); pat_i != nullptr; pat_i = pat_i->ref ? pat_i->ref->getObject() : nullptr) { if (SP_IS_IMAGE(pat_i)) { *epixbuf = ((SPImage *)pat_i)->pixbuf; return; -- cgit v1.2.3