From fb0dbce15b3c32a85e0a3523ba64cd1587849027 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 10 Aug 2017 12:14:56 +0200 Subject: [PATCH] system/EventFD: use class UniqueFileDescriptor --- src/system/EventFD.hxx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/system/EventFD.hxx b/src/system/EventFD.hxx index 5ca77bc1c..2ec62fc68 100644 --- a/src/system/EventFD.hxx +++ b/src/system/EventFD.hxx @@ -21,7 +21,7 @@ #define MPD_EVENT_FD_HXX #include "check.h" -#include "FileDescriptor.hxx" +#include "UniqueFileDescriptor.hxx" /** * A class that wraps eventfd(). @@ -29,16 +29,10 @@ * Errors in the constructor are fatal. */ class EventFD { - FileDescriptor fd; + UniqueFileDescriptor fd; public: EventFD(); - ~EventFD() { - fd.Close(); - } - - EventFD(const EventFD &other) = delete; - EventFD &operator=(const EventFD &other) = delete; int Get() const { return fd.Get();