forked from mirror/OpenTTD
Codechange: Store info about the dedicated server log file in globals with automatic destruction to simplify control flow in openttd_main.
This commit is contained in:
@@ -159,4 +159,12 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/** Helper to manage a FILE with a \c std::unique_ptr. */
|
||||
struct FileDeleter {
|
||||
void operator()(FILE *f)
|
||||
{
|
||||
if (f) fclose(f);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* FILEIO_FUNC_H */
|
||||
|
Reference in New Issue
Block a user