diff options
author | Kai Sommerfeld <kso@openoffice.org> | 2001-03-08 11:52:12 +0000 |
---|---|---|
committer | Kai Sommerfeld <kso@openoffice.org> | 2001-03-08 11:52:12 +0000 |
commit | f7b2927f5e98232f76d9752fdacbe7010d84fedc (patch) | |
tree | c4908791591ace11c0cceb1d6bfea9fcec09b926 /ucb | |
parent | fe21c6409f45b968505445b8edee69b4fe492a34 (diff) |
Optimized NeonInputStream::readBytes(...).
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/webdav/NeonInputStream.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ucb/source/ucp/webdav/NeonInputStream.cxx b/ucb/source/ucp/webdav/NeonInputStream.cxx index 713f3475a0ed..3ca9b3333df6 100644 --- a/ucb/source/ucp/webdav/NeonInputStream.cxx +++ b/ucb/source/ucp/webdav/NeonInputStream.cxx @@ -2,9 +2,9 @@ * * $RCSfile: NeonInputStream.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: kso $ $Date: 2000-11-10 15:23:19 $ + * last change: $Author: kso $ $Date: 2001-03-08 12:52:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -60,6 +60,10 @@ ************************************************************************/ #include "NeonInputStream.hxx" +#ifndef _RTL_MEMORY_H_ +#include <rtl/memory.h> +#endif + using namespace cppu; using namespace rtl; using namespace com::sun::star::io; @@ -132,11 +136,9 @@ sal_Int32 SAL_CALL NeonInputStream::readBytes( // Realloc buffer. aData.realloc( theBytes2Read ); - sal_Int8 * theBuffer = aData.getArray(); - // Write the data - for ( sal_Int32 theIndex = 0; theIndex < theBytes2Read; theIndex ++ ) - theBuffer[ theIndex ] = mInputBuffer[ mPos + theIndex ]; + rtl_copyMemory( + aData.getArray(), mInputBuffer.getConstArray() + mPos, theBytes2Read ); // Update our stream position for next time mPos += theBytes2Read; |