activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r799458 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/TimerTaskHeap.cpp
Date Thu, 30 Jul 2009 22:16:16 GMT
Author: tabish
Date: Thu Jul 30 22:16:15 2009
New Revision: 799458

URL: http://svn.apache.org/viewvc?rev=799458&view=rev
Log:
64bit OS fix

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/TimerTaskHeap.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/TimerTaskHeap.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/TimerTaskHeap.cpp?rev=799458&r1=799457&r2=799458&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/TimerTaskHeap.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/TimerTaskHeap.cpp
Thu Jul 30 22:16:15 2009
@@ -70,14 +70,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 void TimerTaskHeap::upHeap() {
 
-    if( heap.size() <= 1 ) {
-        return;  // Can't get any higher than the top.
-    }
-
     std::size_t current = heap.size() - 1;
     std::size_t parent = ( current - 1 ) / 2;
 
-    while( heap[current]->when < heap[parent]->when) {
+    while( current != 0 && heap[current]->when < heap[parent]->when) {
 
         // swap the two
         Pointer<TimerTask> tmp = heap[current];



Mime
View raw message