summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-01-20 21:56:28 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-01-20 21:56:28 +0000
commit1227f27f303d7b30d83b1e18ffaa42c4c1d02bd6 (patch)
tree86864bc7951fa5833464e834216a1ceb353e5753
parent52e0509c7d5c297be5f180ab1bb6591aa2cc3f47 (diff)
downloadATCD-1227f27f303d7b30d83b1e18ffaa42c4c1d02bd6.tar.gz
Fixed a bug that was introduced on Sunday because of the non-use of
position 0 (we have to grow the heap one node early).
-rw-r--r--ace/Timer_Heap_T.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/ace/Timer_Heap_T.cpp b/ace/Timer_Heap_T.cpp
index c68997b6d83..b65dc02ae28 100644
--- a/ace/Timer_Heap_T.cpp
+++ b/ace/Timer_Heap_T.cpp
@@ -217,7 +217,7 @@ template <class TYPE, class FUNCTOR, class ACE_LOCK> int
ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::is_empty (void) const
{
ACE_TRACE ("ACE_Timer_Heap::is_empty");
- return this->cur_size_ == 0;
+ return this->cur_size_ == 0;
}
@@ -369,7 +369,7 @@ ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::reheap_up (ACE_Timer_Node_T<TYPE> *mo
template <class TYPE, class FUNCTOR, class ACE_LOCK> void
ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::insert (ACE_Timer_Node_T<TYPE> *new_node)
{
- if (this->cur_size_ + 1 >= max_size_)
+ if (this->cur_size_ + 2 >= max_size_)
this->grow_heap ();
this->reheap_up (new_node,