1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-09-01 19:09:09 +00:00

Codechange: rename FileDeleter to FileCloser, so it's easier to find

This commit is contained in:
Rubidium
2024-04-30 18:44:43 +02:00
parent dba954e022
commit 7d8b86fa82

View File

@@ -81,8 +81,8 @@ public:
DECLARE_ENUM_AS_BIT_SET(TarScanner::Mode)
/** Helper to manage a FILE with a \c std::unique_ptr. */
struct FileDeleter {
/** Helper to manage "deleting" a FILE for a \c std::unique_ptr. */
struct FileCloser {
void operator()(FILE *f)
{
if (f != nullptr) fclose(f);
@@ -90,6 +90,6 @@ struct FileDeleter {
};
/** Helper type for RAII management of a FILE that gets closed when it goes out of scope. */
using AutoCloseFile = std::unique_ptr<FILE, FileDeleter>;
using AutoCloseFile = std::unique_ptr<FILE, FileCloser>;
#endif /* FILEIO_FUNC_H */