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/proj_pt.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/proj_pt.cpp')
| -rw-r--r-- | src/proj_pt.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
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 |
