summaryrefslogtreecommitdiffstats
path: root/src/io/uristream.cpp
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-06-15 10:46:15 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2018-06-18 12:27:01 +0000
commitf4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43 (patch)
tree7c6044fd3a17a2665841959dac9b3b2110b27924 /src/io/uristream.cpp
parentRun clang-tidy’s modernize-use-override pass. (diff)
downloadinkscape-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/io/uristream.cpp')
-rw-r--r--src/io/uristream.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/io/uristream.cpp b/src/io/uristream.cpp
index 5d2eb59ee..6dfb38e1f 100644
--- a/src/io/uristream.cpp
+++ b/src/io/uristream.cpp
@@ -39,18 +39,18 @@ namespace IO
static FILE *fopen_utf8name( char const *utf8name, int mode )
{
- FILE *fp = NULL;
+ FILE *fp = nullptr;
if (!utf8name)
{
- return NULL;
+ return nullptr;
}
if (mode!=FILE_READ && mode!=FILE_WRITE)
{
- return NULL;
+ return nullptr;
}
#ifndef WIN32
- gchar *filename = g_filename_from_utf8( utf8name, -1, NULL, NULL, NULL );
+ gchar *filename = g_filename_from_utf8( utf8name, -1, nullptr, nullptr, nullptr );
if ( filename ) {
if (mode == FILE_READ)
fp = std::fopen(filename, "rb");
@@ -99,7 +99,7 @@ UriInputStream::UriInputStream(Inkscape::URI &source)
else if (strncmp("data", schemestr, 4)==0)
scheme = SCHEME_DATA;
- gchar *cpath = NULL;
+ gchar *cpath = nullptr;
switch (scheme) {
case SCHEME_FILE:
@@ -132,7 +132,7 @@ UriInputStream::UriInputStream(Inkscape::URI &source)
UriInputStream::UriInputStream(FILE *source, Inkscape::URI &uri)
: uri(uri),
inf(source),
- data(0),
+ data(nullptr),
dataPos(0),
dataLen(0),
closed(false)
@@ -179,7 +179,7 @@ void UriInputStream::close()
return;
fflush(inf);
fclose(inf);
- inf=NULL;
+ inf=nullptr;
break;
case SCHEME_DATA:
@@ -301,7 +301,7 @@ UriOutputStream::UriOutputStream(FILE* fp, Inkscape::URI &destination)
UriOutputStream::UriOutputStream(Inkscape::URI &destination)
: closed(false),
ownsFile(true),
- outf(NULL),
+ outf(nullptr),
uri(destination),
scheme(SCHEME_FILE)
{
@@ -312,7 +312,7 @@ UriOutputStream::UriOutputStream(Inkscape::URI &destination)
else if (strncmp("data", schemestr, 4)==0)
scheme = SCHEME_DATA;
//printf("out schemestr:'%s' scheme:'%d'\n", schemestr, scheme);
- gchar *cpath = NULL;
+ gchar *cpath = nullptr;
switch (scheme) {
@@ -362,7 +362,7 @@ void UriOutputStream::close()
fflush(outf);
if ( ownsFile )
fclose(outf);
- outf=NULL;
+ outf=nullptr;
break;
case SCHEME_DATA: