Merge branch 'save_ext' into jgrpp

# Conflicts:
#	src/debug.cpp
#	src/saveload/saveload.cpp
This commit is contained in:
Jonathan G Rennison
2018-06-01 23:32:33 +01:00
16 changed files with 1227 additions and 217 deletions

View File

@@ -149,4 +149,17 @@ static inline DIR *ttd_opendir(const char *path)
return opendir(OTTD2FS(path));
}
/** Auto-close a file upon scope exit. */
class FileCloser {
FILE *f;
public:
FileCloser(FILE *_f) : f(_f) {}
~FileCloser()
{
fclose(f);
}
};
#endif /* FILEIO_FUNC_H */