Commit fb0dbce1 authored by Max Kellermann's avatar Max Kellermann

system/EventFD: use class UniqueFileDescriptor

parent 83335513
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#define MPD_EVENT_FD_HXX #define MPD_EVENT_FD_HXX
#include "check.h" #include "check.h"
#include "FileDescriptor.hxx" #include "UniqueFileDescriptor.hxx"
/** /**
* A class that wraps eventfd(). * A class that wraps eventfd().
...@@ -29,16 +29,10 @@ ...@@ -29,16 +29,10 @@
* Errors in the constructor are fatal. * Errors in the constructor are fatal.
*/ */
class EventFD { class EventFD {
FileDescriptor fd; UniqueFileDescriptor fd;
public: public:
EventFD(); EventFD();
~EventFD() {
fd.Close();
}
EventFD(const EventFD &other) = delete;
EventFD &operator=(const EventFD &other) = delete;
int Get() const { int Get() const {
return fd.Get(); return fd.Get();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment