diff options
author | Michael Lutz <michi@icosahedron.de> | 2020-12-06 21:11:44 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2020-12-27 13:19:25 +0100 |
commit | f3326d34e78bd28fba6d8cfd3bc455a506b429fe (patch) | |
tree | 307a0608a7fb1c211fd72a8b8326cfe9bb1d37a2 /src/fileio_func.h | |
parent | 0c6e8a8123c9f74db757272f73adcbd8621e012d (diff) | |
download | openttd-f3326d34e78bd28fba6d8cfd3bc455a506b429fe.tar.xz |
Codechange: Use std::string in FIO search path handling.
Diffstat (limited to 'src/fileio_func.h')
-rw-r--r-- | src/fileio_func.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/fileio_func.h b/src/fileio_func.h index a4bdeb007..83e90be17 100644 --- a/src/fileio_func.h +++ b/src/fileio_func.h @@ -39,16 +39,15 @@ bool IsValidSearchPath(Searchpath sp); void FioFCloseFile(FILE *f); 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); -char *FioAppendDirectory(char *buf, const char *last, Searchpath sp, Subdirectory subdir); -char *FioGetDirectory(char *buf, const char *last, Subdirectory subdir); +std::string FioFindFullPath(Subdirectory subdir, const char *filename); +std::string FioGetDirectory(Searchpath sp, Subdirectory subdir); +std::string FioFindDirectory(Subdirectory subdir); void FioCreateDirectory(const char *name); const char *FiosGetScreenshotDir(); void SanitizeFilename(char *filename); -bool AppendPathSeparator(char *buf, const char *last); +void AppendPathSeparator(std::string &buf); void DeterminePaths(const char *exe); void *ReadFileToMem(const char *filename, size_t *lenp, size_t maxsize); bool FileExists(const char *filename); |