diff options
author | Michael Lutz <michi@icosahedron.de> | 2020-12-06 21:11:43 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2020-12-27 13:19:25 +0100 |
commit | 0c6e8a8123c9f74db757272f73adcbd8621e012d (patch) | |
tree | 626d723efa78c770f26b442efe7b36d584afe826 /src/fileio_func.h | |
parent | dd138fc460dcbab37452e90ff070a31516994aa2 (diff) | |
download | openttd-0c6e8a8123c9f74db757272f73adcbd8621e012d.tar.xz |
Codechange: Store file search paths as std::string.
Diffstat (limited to 'src/fileio_func.h')
-rw-r--r-- | src/fileio_func.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/fileio_func.h b/src/fileio_func.h index b883a00e8..a4bdeb007 100644 --- a/src/fileio_func.h +++ b/src/fileio_func.h @@ -27,22 +27,11 @@ void FioReadBlock(void *ptr, size_t size); void FioSkipBytes(int n); /** - * The search paths OpenTTD could search through. - * At least one of the slots has to be filled with a path. - * nullptr paths tell that there is no such path for the - * current operating system. - */ -extern const char *_searchpaths[NUM_SEARCHPATHS]; - -/** * Checks whether the given search path is a valid search path * @param sp the search path to check * @return true if the search path is valid */ -static inline bool IsValidSearchPath(Searchpath sp) -{ - return sp < NUM_SEARCHPATHS && _searchpaths[sp] != nullptr; -} +bool IsValidSearchPath(Searchpath sp); /** Iterator for all the search paths */ #define FOR_ALL_SEARCHPATHS(sp) for (sp = SP_FIRST_DIR; sp < NUM_SEARCHPATHS; sp++) if (IsValidSearchPath(sp)) |