diff options
author | Elliott Hughes <enh@google.com> | 2015-11-13 17:27:55 +0100 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-11-13 17:27:55 +0100 |
commit | 5c6912148b2143cbdf4cc580c723fac05e9324f8 (patch) | |
tree | cd94fb1681bc08f6dac3f34e9a7f003742441e5c /unique_fd.h | |
parent | Merge "uncrypt: remove O_SYNC to avoid time-out failures" (diff) | |
parent | We can use fclose directly in std::unique_ptr. (diff) | |
download | android_bootable_recovery-5c6912148b2143cbdf4cc580c723fac05e9324f8.tar android_bootable_recovery-5c6912148b2143cbdf4cc580c723fac05e9324f8.tar.gz android_bootable_recovery-5c6912148b2143cbdf4cc580c723fac05e9324f8.tar.bz2 android_bootable_recovery-5c6912148b2143cbdf4cc580c723fac05e9324f8.tar.lz android_bootable_recovery-5c6912148b2143cbdf4cc580c723fac05e9324f8.tar.xz android_bootable_recovery-5c6912148b2143cbdf4cc580c723fac05e9324f8.tar.zst android_bootable_recovery-5c6912148b2143cbdf4cc580c723fac05e9324f8.zip |
Diffstat (limited to 'unique_fd.h')
-rw-r--r-- | unique_fd.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/unique_fd.h b/unique_fd.h index 98a7c7b67..cc85383f8 100644 --- a/unique_fd.h +++ b/unique_fd.h @@ -59,15 +59,4 @@ class unique_fd { unique_fd& operator=(const unique_fd&) = delete; }; -// Custom deleter for unique_file to avoid fclose(NULL). -struct safe_fclose { - void operator()(FILE *fp) const { - if (fp) { - fclose(fp); - }; - } -}; - -using unique_file = std::unique_ptr<FILE, safe_fclose>; - #endif // UNIQUE_FD_H |