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/proj_pt.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/proj_pt.cpp') diff --git a/src/proj_pt.cpp b/src/proj_pt.cpp index 311b9a034..bb340f425 100644 --- a/src/proj_pt.cpp +++ b/src/proj_pt.cpp @@ -25,15 +25,15 @@ Pt2::Pt2(const char *coord_str) { return; } char **coords = g_strsplit(coord_str, ":", 0); - if (coords[0] == NULL || coords[1] == NULL || coords[2] == NULL) { + if (coords[0] == nullptr || coords[1] == nullptr || coords[2] == nullptr) { g_strfreev (coords); g_warning ("Malformed coordinate string.\n"); return; } - pt[0] = g_ascii_strtod(coords[0], NULL); - pt[1] = g_ascii_strtod(coords[1], NULL); - pt[2] = g_ascii_strtod(coords[2], NULL); + pt[0] = g_ascii_strtod(coords[0], nullptr); + pt[1] = g_ascii_strtod(coords[1], nullptr); + pt[2] = g_ascii_strtod(coords[2], nullptr); g_strfreev (coords); } @@ -73,17 +73,17 @@ Pt3::Pt3(const char *coord_str) { return; } char **coords = g_strsplit(coord_str, ":", 0); - if (coords[0] == NULL || coords[1] == NULL || - coords[2] == NULL || coords[3] == NULL) { + if (coords[0] == nullptr || coords[1] == nullptr || + coords[2] == nullptr || coords[3] == nullptr) { g_strfreev (coords); g_warning ("Malformed coordinate string.\n"); return; } - pt[0] = g_ascii_strtod(coords[0], NULL); - pt[1] = g_ascii_strtod(coords[1], NULL); - pt[2] = g_ascii_strtod(coords[2], NULL); - pt[3] = g_ascii_strtod(coords[3], NULL); + pt[0] = g_ascii_strtod(coords[0], nullptr); + pt[1] = g_ascii_strtod(coords[1], nullptr); + pt[2] = g_ascii_strtod(coords[2], nullptr); + pt[3] = g_ascii_strtod(coords[3], nullptr); } void -- cgit v1.2.3