activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r554286 - /activemq/activemq-cpp/trunk/src/main/activemq/util/Properties.h
Date Sun, 08 Jul 2007 00:59:31 GMT
Author: tabish
Date: Sat Jul  7 17:59:30 2007
New Revision: 554286

URL: http://svn.apache.org/viewvc?view=rev&rev=554286
Log:
http://issues.apache.org/activemq/browse/AMQCPP-128

Properties performance increase

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

Modified: activemq/activemq-cpp/trunk/src/main/activemq/util/Properties.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/util/Properties.h?view=diff&rev=554286&r1=554285&r2=554286
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/util/Properties.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/util/Properties.h Sat Jul  7 17:59:30 2007
@@ -92,6 +92,7 @@
         virtual void setProperty( const std::string& name,
                                   const std::string& value ){
             properties[name] = value;
+            //properties.insert( std::make_pair( name, value ) );
         }
 
         /**
@@ -126,15 +127,19 @@
         virtual std::vector< std::pair< std::string, std::string > > toArray()
const{
 
             // Create a vector big enough to hold all the elements in the map.
-            std::vector< std::pair<std::string, std::string> > vec( properties.size()
);
+            std::vector< std::pair<std::string, std::string> > vec(
+                    properties.begin(), properties.end() );
 
-            // Get an iterator at the beginning of the map.
-            std::map< std::string, std::string >::const_iterator iter = properties.begin();
-
-            // Copy all of the elements from the map to the vector.
-            for( int ix=0; iter != properties.end(); ++iter, ++ix ){
-                vec[ix] = *iter;
-            }
+//            // Create a vector big enough to hold all the elements in the map.
+//            std::vector< std::pair<std::string, std::string> > vec( properties.size()
);
+//
+//            // Get an iterator at the beginning of the map.
+//            std::map< std::string, std::string >::const_iterator iter = properties.begin();
+//
+//            // Copy all of the elements from the map to the vector.
+//            for( int ix=0; iter != properties.end(); ++iter, ++ix ){
+//                vec[ix] = *iter;
+//            }
 
             return vec;
         }



Mime
View raw message