From 7e4fa8505f479c494b9e7bab361e4a11e1c579a5 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 16 Feb 2012 10:04:42 +0900 Subject: poller_base_t is used instead of poller_t Poller object is virtualised. You can access poller via its base class (poller_base_t) instead of using poller_t which was a typedef pointing to actual derived class. Signed-off-by: Martin Sustrik --- src/io_thread.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/io_thread.cpp') diff --git a/src/io_thread.cpp b/src/io_thread.cpp index 75bca4f..c1f5849 100644 --- a/src/io_thread.cpp +++ b/src/io_thread.cpp @@ -29,8 +29,8 @@ xs::io_thread_t::io_thread_t (ctx_t *ctx_, uint32_t tid_) : object_t (ctx_, tid_) { - poller = new (std::nothrow) poller_t; - alloc_assert (poller); + poller = poller_base_t::create (); + xs_assert (poller); mailbox_handle = poller->add_fd (mailbox.get_fd (), this); poller->set_pollin (mailbox_handle); @@ -95,7 +95,7 @@ void xs::io_thread_t::timer_event (int id_) xs_assert (false); } -xs::poller_t *xs::io_thread_t::get_poller () +xs::poller_base_t *xs::io_thread_t::get_poller () { xs_assert (poller); return poller; -- cgit v1.2.3