From 7d8b86fa823a703bfeb062549e478902d74cfd63 Mon Sep 17 00:00:00 2001 From: Rubidium Date: Tue, 30 Apr 2024 18:44:43 +0200 Subject: [PATCH] Codechange: rename FileDeleter to FileCloser, so it's easier to find --- src/fileio_func.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fileio_func.h b/src/fileio_func.h index cf0821d7ac..6d1c6326e2 100644 --- a/src/fileio_func.h +++ b/src/fileio_func.h @@ -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; +using AutoCloseFile = std::unique_ptr; #endif /* FILEIO_FUNC_H */