activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r546103 - /activemq/activemq-cpp/trunk/src/main/activemq/io/ByteArrayInputStream.cpp
Date Mon, 11 Jun 2007 11:41:18 GMT
Author: tabish
Date: Mon Jun 11 04:41:17 2007
New Revision: 546103

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

Modified:
    activemq/activemq-cpp/trunk/src/main/activemq/io/ByteArrayInputStream.cpp

Modified: activemq/activemq-cpp/trunk/src/main/activemq/io/ByteArrayInputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/io/ByteArrayInputStream.cpp?view=diff&rev=546103&r1=546102&r2=546103
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/io/ByteArrayInputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/io/ByteArrayInputStream.cpp Mon Jun 11 04:41:17
2007
@@ -59,10 +59,11 @@
     activeBuffer = &defaultBuffer;
 
     // Remove old data
-    defaultBuffer.resize( lbufferSize );
+    defaultBuffer.clear();
+    defaultBuffer.reserve( lbufferSize );
 
-    // Copy to internal buffer
-    std::copy( lbuffer, lbuffer + lbufferSize, &defaultBuffer[0] );
+    // Copy data to internal buffer.
+    defaultBuffer.insert( defaultBuffer.end(), lbuffer, lbuffer + lbufferSize );
 
     // Begin at the Beginning.
     reset();



Mime
View raw message