activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1310579 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util: PriorityQueue.cpp PriorityQueue.h
Date Fri, 06 Apr 2012 20:42:51 GMT
Author: tabish
Date: Fri Apr  6 20:42:51 2012
New Revision: 1310579

URL: http://svn.apache.org/viewvc?rev=1310579&view=rev
Log:
fix for: https://issues.apache.org/jira/browse/AMQCPP-392

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.cpp?rev=1310579&r1=1310578&r2=1310579&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.cpp Fri Apr
 6 20:42:51 2012
@@ -16,3 +16,8 @@
  */
 
 #include "PriorityQueue.h"
+
+////////////////////////////////////////////////////////////////////////////////
+const int decaf::util::PriorityQueueBase::DEFAULT_CAPACITY = 11;
+const int decaf::util::PriorityQueueBase::DEFAULT_CAPACITY_RATIO = 2;
+

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.h?rev=1310579&r1=1310578&r2=1310579&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.h Fri Apr 
6 20:42:51 2012
@@ -35,6 +35,14 @@
 namespace decaf {
 namespace util {
 
+    class DECAF_API PriorityQueueBase {
+    protected:
+
+        static const int DEFAULT_CAPACITY;
+        static const int DEFAULT_CAPACITY_RATIO;
+
+    };
+
     /**
      * An unbounded priority queue based on a binary heap algorithm. The elements of the
priority queue
      * are ordered according to their natural ordering, or by a Comparator provided to one
of the constructors
@@ -66,12 +74,9 @@ namespace util {
      * @since 1.0
      */
     template< typename E >
-    class PriorityQueue : public AbstractQueue<E> {
+    class PriorityQueue : public AbstractQueue<E>, private PriorityQueueBase {
     private:
 
-        static const int DEFAULT_CAPACITY = 11;
-        static const int DEFAULT_CAPACITY_RATIO = 2;
-
         int _size;
         int capacity;
         E* elements;



Mime
View raw message