activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1050448 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util: StlList.h StlSet.h
Date Fri, 17 Dec 2010 16:55:58 GMT
Author: tabish
Date: Fri Dec 17 16:55:58 2010
New Revision: 1050448

URL: http://svn.apache.org/viewvc?rev=1050448&view=rev
Log:
Couple of small fixes for windows builds

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

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlList.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlList.h?rev=1050448&r1=1050447&r2=1050448&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlList.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlList.h Fri Dec 17 16:55:58
2010
@@ -264,25 +264,32 @@ namespace util{
             AbstractList<E>::copy( source );
         }
 
-        virtual ~StlList() {}
-
-        using AbstractList<E>::equals;
-
         /**
          * {@inheritDoc}
          */
-        bool equals( const StlList& source ) const {
-            return this->values == source.values;
-        }
+        virtual bool equals( const Collection<E>& collection ) const {
 
-        using AbstractList<E>::copy;
+            const StlList<E>* listptr = dynamic_cast<const StlList<E>*>(
&collection );
+            if( listptr == NULL ) {
+                return AbstractList<E>::equals( collection );
+            }
+
+            return this->values == listptr->values;
+        }
 
         /**
          * {@inheritDoc}
          */
-        void copy( const StlList& source ) {
+        virtual void copy( const Collection<E>& collection ) {
+
+            const StlList<E>* listptr = dynamic_cast<const StlList<E>*>(
&collection );
+            if( listptr == NULL ) {
+                AbstractList<E>::copy( collection );
+                return;
+            }
+
             this->values.clear();
-            this->values = source.values;
+            this->values = listptr->values;
         }
 
         /**

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlSet.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlSet.h?rev=1050448&r1=1050447&r2=1050448&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlSet.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlSet.h Fri Dec 17 16:55:58
2010
@@ -159,23 +159,32 @@ namespace util{
             return new ConstSetIterator( &values );
         }
 
-        using AbstractSet<E>::equals;
-
         /**
          * {@inheritDoc}
          */
-        bool equals( const StlSet& source ) const {
-            return this->values == source.values;
-        }
+        virtual bool equals( const Collection<E>& collection ) const {
+
+            const StlSet<E>* setptr = dynamic_cast<const StlSet<E>*>( &collection
);
+            if( setptr == NULL ) {
+                return AbstractSet<E>::equals( collection );
+            }
 
-        using AbstractSet<E>::copy;
+            return this->values == setptr->values;
+        }
 
         /**
          * {@inheritDoc}
          */
-        void copy( const StlSet& source ) {
+        virtual void copy( const Collection<E>& collection ) {
+
+            const StlSet<E>* setptr = dynamic_cast<const StlSet<E>*>( &collection
);
+            if( setptr == NULL ) {
+                AbstractSet<E>::copy( collection );
+                return;
+            }
+
             this->values.clear();
-            this->values = source.values;
+            this->values = setptr->values;
         }
 
         /**



Mime
View raw message