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/odf.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/extension/internal/odf.cpp') diff --git a/src/extension/internal/odf.cpp b/src/extension/internal/odf.cpp index 42c2bbae3..2c25ea1f4 100644 --- a/src/extension/internal/odf.cpp +++ b/src/extension/internal/odf.cpp @@ -218,7 +218,7 @@ private: virtual void init() { badval = 0.0; - d = NULL; + d = nullptr; rows = 0; cols = 0; size = 0; @@ -229,7 +229,7 @@ private: if (d) { delete[] d; - d = 0; + d = nullptr; } rows = other.rows; cols = other.cols; @@ -289,7 +289,7 @@ public: SingularValueDecomposition (const SVDMatrix &mat) : A (mat), U (), - s (NULL), + s (nullptr), s_size (0), V () { @@ -1010,7 +1010,7 @@ static void gatherText(Inkscape::XML::Node *node, Glib::ustring &buf) } for (Inkscape::XML::Node *child = node->firstChild() ; - child != NULL; child = child->next()) + child != nullptr; child = child->next()) { gatherText(child, buf); } @@ -1466,7 +1466,7 @@ bool OdfOutput::processGradient(SPItem *item, //## Gradient SPGradient *gradient = SP_GRADIENT((checkFillGradient?(SP_STYLE_FILL_SERVER(style)) :(SP_STYLE_STROKE_SERVER(style)))); - if (gradient == NULL) + if (gradient == nullptr) { return false; } @@ -1644,7 +1644,7 @@ bool OdfOutput::writeTree(Writer &couts, Writer &souts, analyzeTransform(tf, rotate, xskew, yskew, xscale, yscale); //# Do our stuff - SPCurve *curve = NULL; + SPCurve *curve = nullptr; if (nodeName == "svg" || nodeName == "svg:svg") { @@ -2038,7 +2038,7 @@ bool OdfOutput::writeContent(ZipFile &zf, Inkscape::XML::Node *node) //# Descend into the tree, doing all of our conversions //# to both files at the same time - char *oldlocale = g_strdup (setlocale (LC_NUMERIC, NULL)); + char *oldlocale = g_strdup (setlocale (LC_NUMERIC, nullptr)); setlocale (LC_NUMERIC, "C"); if (!writeTree(couts, souts, node)) { -- cgit v1.2.3