diff options
Diffstat (limited to 'cpp/src/qpid/sys/Dispatcher.cpp')
-rw-r--r-- | cpp/src/qpid/sys/Dispatcher.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/Dispatcher.cpp b/cpp/src/qpid/sys/Dispatcher.cpp index b8751168c2..d49af9d079 100644 --- a/cpp/src/qpid/sys/Dispatcher.cpp +++ b/cpp/src/qpid/sys/Dispatcher.cpp @@ -21,6 +21,8 @@ #include "Dispatcher.h" +#include <boost/cast.hpp> + #include <assert.h> namespace qpid { @@ -36,7 +38,8 @@ Dispatcher::~Dispatcher() { void Dispatcher::run() { do { Poller::Event event = poller->wait(); - DispatchHandle* h = static_cast<DispatchHandle*>(event.handle); + DispatchHandle* h = + boost::polymorphic_downcast<DispatchHandle*>(event.handle); // If can read/write then dispatch appropriate callbacks if (h) { |