Author: tabish Date: Tue Jul 3 05:51:58 2007 New Revision: 552819 URL: http://svn.apache.org/viewvc?view=rev&rev=552819 Log: http://issues.apache.org/activemq/browse/AMQCPP-103 Building Decaf lib, optimizations Modified: activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/io/ByteArrayOutputStream.cpp Modified: activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/io/ByteArrayOutputStream.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/io/ByteArrayOutputStream.cpp?view=diff&rev=552819&r1=552818&r2=552819 ============================================================================== --- activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/io/ByteArrayOutputStream.cpp (original) +++ activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/io/ByteArrayOutputStream.cpp Tue Jul 3 05:51:58 2007 @@ -60,13 +60,7 @@ std::size_t len ) throw ( IOException ) { - - // Iterate until all the data is written. -// for( std::size_t ix = 0; ix < len; ++ix) -// { -// activeBuffer->push_back( buffer[ix] ); -// } - - activeBuffer->insert( activeBuffer->end(), buffer, buffer + len ); + std::back_insert_iterator< std::vector > iter( *activeBuffer ); + std::copy( buffer, buffer + len, iter ); }