Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
std::vector<std::function<int(int)>> handlers;
std::vector<struct pollfd> pfds;
- Poller();
+ Poller() = default;
void add_fd(int fd, std::function<int(int)> handler);
int check_events();
};
-Poller::Poller()
- : handlers(),
- pfds()
-{
-}
-
void Poller::add_fd(int fd, std::function<int(int)> handler) {
pfds.emplace_back(pollfd{ .fd = fd, .events = POLLIN, .revents = 0 });
handlers.emplace_back(std::move(handler));