diff options
author | Henry Wilson <m3henry@googlemail.com> | 2019-04-10 22:07:06 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2019-04-10 23:22:20 +0200 |
commit | 7c8e7c6b6e16d4a26259a676db32d8776b99817e (patch) | |
tree | 99f134b7e66367cf11e10bc5061896eab4a3264f /src/fileio_func.h | |
parent | 3b4f224c0bc50e7248050d4bcbb6d83fd510c1cc (diff) | |
download | openttd-7c8e7c6b6e16d4a26259a676db32d8776b99817e.tar.xz |
Codechange: Use null pointer literal instead of the NULL macro
Diffstat (limited to 'src/fileio_func.h')
-rw-r--r-- | src/fileio_func.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fileio_func.h b/src/fileio_func.h index 8263b7872..dd3727df0 100644 --- a/src/fileio_func.h +++ b/src/fileio_func.h @@ -30,7 +30,7 @@ void FioSkipBytes(int n); /** * The search paths OpenTTD could search through. * At least one of the slots has to be filled with a path. - * NULL paths tell that there is no such path for the + * nullptr paths tell that there is no such path for the * current operating system. */ extern const char *_searchpaths[NUM_SEARCHPATHS]; @@ -42,14 +42,14 @@ extern const char *_searchpaths[NUM_SEARCHPATHS]; */ static inline bool IsValidSearchPath(Searchpath sp) { - return sp < NUM_SEARCHPATHS && _searchpaths[sp] != NULL; + return sp < NUM_SEARCHPATHS && _searchpaths[sp] != nullptr; } /** Iterator for all the search paths */ #define FOR_ALL_SEARCHPATHS(sp) for (sp = SP_FIRST_DIR; sp < NUM_SEARCHPATHS; sp++) if (IsValidSearchPath(sp)) void FioFCloseFile(FILE *f); -FILE *FioFOpenFile(const char *filename, const char *mode, Subdirectory subdir, size_t *filesize = NULL); +FILE *FioFOpenFile(const char *filename, const char *mode, Subdirectory subdir, size_t *filesize = nullptr); bool FioCheckFileExists(const char *filename, Subdirectory subdir); char *FioGetFullPath(char *buf, const char *last, Searchpath sp, Subdirectory subdir, const char *filename); char *FioFindFullPath(char *buf, const char *last, Subdirectory subdir, const char *filename); @@ -107,7 +107,7 @@ public: ALL = BASESET | NEWGRF | AI | SCENARIO | GAME, ///< Scan for everything. }; - bool AddFile(const char *filename, size_t basepath_length, const char *tar_filename = NULL) override; + bool AddFile(const char *filename, size_t basepath_length, const char *tar_filename = nullptr) override; bool AddFile(Subdirectory sd, const char *filename); |