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/latex-pstricks.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/latex-pstricks.cpp')
| -rw-r--r-- | src/extension/internal/latex-pstricks.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/extension/internal/latex-pstricks.cpp b/src/extension/internal/latex-pstricks.cpp index 83100d11e..aa90c4f59 100644 --- a/src/extension/internal/latex-pstricks.cpp +++ b/src/extension/internal/latex-pstricks.cpp @@ -39,7 +39,7 @@ namespace Internal { PrintLatex::PrintLatex (void): _width(0), _height(0), - _stream(NULL) + _stream(nullptr) { } @@ -63,11 +63,11 @@ unsigned int PrintLatex::begin (Inkscape::Extension::Print *mod, SPDocument *doc { Inkscape::SVGOStringStream os; int res; - FILE *osf = NULL; - const gchar * fn = NULL; + FILE *osf = nullptr; + const gchar * fn = nullptr; gsize bytesRead = 0; gsize bytesWritten = 0; - GError* error = NULL; + GError* error = nullptr; os.setf(std::ios::fixed); fn = mod->get_param_string("destination"); @@ -80,7 +80,7 @@ unsigned int PrintLatex::begin (Inkscape::Extension::Print *mod, SPDocument *doc * the callers (sp_print_document_to_file, "ret = mod->begin(doc)") wrongly ignores the * return code. */ - if (fn != NULL) { + if (fn != nullptr) { while (isspace(*fn)) fn += 1; Inkscape::IO::dump_fopen_call(fn, "K"); osf = Inkscape::IO::fopen_utf8name(fn, "w+"); @@ -110,7 +110,7 @@ unsigned int PrintLatex::begin (Inkscape::Extension::Print *mod, SPDocument *doc g_print("Printing failed\n"); /* fixme: should use pclose() for pipes */ fclose(_stream); - _stream = NULL; + _stream = nullptr; fflush(stdout); return 0; } @@ -144,7 +144,7 @@ unsigned int PrintLatex::finish(Inkscape::Extension::Print * /*mod*/) fflush(_stream); fclose(_stream); - _stream = NULL; + _stream = nullptr; } return 0; } |
