diff options
Diffstat (limited to '3rdParty/Boost/src/boost/asio/detail/timer_queue.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/asio/detail/timer_queue.hpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/3rdParty/Boost/src/boost/asio/detail/timer_queue.hpp b/3rdParty/Boost/src/boost/asio/detail/timer_queue.hpp index f5370e5..35c8a77 100644 --- a/3rdParty/Boost/src/boost/asio/detail/timer_queue.hpp +++ b/3rdParty/Boost/src/boost/asio/detail/timer_queue.hpp @@ -2,7 +2,7 @@ // timer_queue.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -20,10 +20,10 @@ #include <boost/asio/detail/push_options.hpp> #include <cstddef> #include <functional> -#include <limits> #include <memory> #include <vector> #include <boost/config.hpp> +#include <boost/limits.hpp> #include <boost/asio/detail/pop_options.hpp> #include <boost/asio/error.hpp> @@ -67,8 +67,10 @@ public: heap_.reserve(heap_.size() + 1); // Create a new timer object. - std::auto_ptr<timer<Handler> > new_timer( - new timer<Handler>(time, handler, token)); + typedef timer<Handler> timer_type; + typedef handler_alloc_traits<Handler, timer_type> alloc_traits; + raw_handler_ptr<alloc_traits> raw_ptr(handler); + handler_ptr<alloc_traits> new_timer(raw_ptr, time, handler, token); // Insert the new timer into the hash. typedef typename hash_map<void*, timer_base*>::iterator iterator; @@ -78,12 +80,12 @@ public: if (!result.second) { result.first->second->prev_ = new_timer.get(); - new_timer->next_ = result.first->second; + new_timer.get()->next_ = result.first->second; result.first->second = new_timer.get(); } // Put the timer at the correct position in the heap. - new_timer->heap_index_ = heap_.size(); + new_timer.get()->heap_index_ = heap_.size(); heap_.push_back(new_timer.get()); up_heap(heap_.size() - 1); bool is_first = (heap_[0] == new_timer.get()); |