From commits-return-18537-apmail-activemq-commits-archive=activemq.apache.org@activemq.apache.org Fri Apr 6 20:43:13 2012 Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2DA5C992F for ; Fri, 6 Apr 2012 20:43:13 +0000 (UTC) Received: (qmail 51333 invoked by uid 500); 6 Apr 2012 20:43:13 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 51305 invoked by uid 500); 6 Apr 2012 20:43:13 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 51298 invoked by uid 99); 6 Apr 2012 20:43:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Apr 2012 20:43:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Apr 2012 20:43:12 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 0D44223889FD for ; Fri, 6 Apr 2012 20:42:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120406204252.0D44223889FD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 { + class PriorityQueue : public AbstractQueue, private PriorityQueueBase { private: - static const int DEFAULT_CAPACITY = 11; - static const int DEFAULT_CAPACITY_RATIO = 2; - int _size; int capacity; E* elements;