event/EPoll: use C++11 initializer

This commit is contained in:
Max Kellermann 2018-01-29 21:58:05 +01:00
parent ea402b765c
commit 2c65f986d6

View File

@ -33,10 +33,9 @@ class PollResultEPoll
friend class PollGroupEPoll; friend class PollGroupEPoll;
std::array<epoll_event, 16> events; std::array<epoll_event, 16> events;
size_t n_events; size_t n_events = 0;
public:
PollResultEPoll() : n_events(0) { }
public:
size_t GetSize() const { return n_events; } size_t GetSize() const { return n_events; }
unsigned GetEvents(size_t i) const { return events[i].events; } unsigned GetEvents(size_t i) const { return events[i].events; }
void *GetObject(size_t i) const { return events[i].data.ptr; } void *GetObject(size_t i) const { return events[i].data.ptr; }