use nullptr instead of NULL

This commit is contained in:
john30
2018-05-06 14:54:52 +02:00
parent dc12476bc1
commit 1c17f7c466
41 changed files with 625 additions and 626 deletions
+3 -3
View File
@@ -40,18 +40,18 @@ istream* FileReader::openFile(const string& filename, string* errorDescription,
struct stat st;
if (stat(filename.c_str(), &st) != 0) {
*errorDescription = filename;
return NULL;
return nullptr;
}
if (S_ISDIR(st.st_mode)) {
*errorDescription = filename+" is a directory";
return NULL;
return nullptr;
}
ifstream* stream = new ifstream();
stream->open(filename.c_str(), ifstream::in);
if (!stream->is_open()) {
*errorDescription = filename;
delete(stream);
return NULL;
return nullptr;
}
if (time) {
*time = st.st_mtime;