activemq-commits mailing list archives

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

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

Modified:
    activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/decaf/util/PriorityQueue.cpp
    activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/decaf/util/PriorityQueue.h

Modified: activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/decaf/util/PriorityQueue.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/decaf/util/PriorityQueue.cpp?rev=1310578&r1=1310577&r2=1310578&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/decaf/util/PriorityQueue.cpp
(original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/decaf/util/PriorityQueue.cpp
Fri Apr  6 20:42:31 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/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/decaf/util/PriorityQueue.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/decaf/util/PriorityQueue.h?rev=1310578&r1=1310577&r2=1310578&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/decaf/util/PriorityQueue.h
(original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/decaf/util/PriorityQueue.h
Fri Apr  6 20:42:31 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