diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-09-30 18:46:42 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-09-30 18:46:42 (GMT) |
commit | 1b255f6ba90847240b92126deb5ea0174ad269b0 (patch) | |
tree | 9d56e647ebc35c0f0941d19a302b888c1185ce1c /Swiften/FileTransfer/ReadBytestream.h | |
parent | af976a75b5e1b504a340602659ef930109cd2c48 (diff) | |
download | swift-contrib-1b255f6ba90847240b92126deb5ea0174ad269b0.zip swift-contrib-1b255f6ba90847240b92126deb5ea0174ad269b0.tar.bz2 |
Avoid a copy when reading from a byte array.
Diffstat (limited to 'Swiften/FileTransfer/ReadBytestream.h')
-rw-r--r-- | Swiften/FileTransfer/ReadBytestream.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Swiften/FileTransfer/ReadBytestream.h b/Swiften/FileTransfer/ReadBytestream.h index 0e95f7b..c94e4d3 100644 --- a/Swiften/FileTransfer/ReadBytestream.h +++ b/Swiften/FileTransfer/ReadBytestream.h @@ -6,6 +6,7 @@ #pragma once +#include <boost/shared_ptr.hpp> #include <vector> #include <Swiften/Base/boost_bsignals.h> @@ -19,7 +20,7 @@ namespace Swift { * Return an empty vector if no more data is available. * Use onDataAvailable signal for signaling there is data available again. */ - virtual std::vector<unsigned char> read(size_t size) = 0; + virtual boost::shared_ptr< std::vector<unsigned char> > read(size_t size) = 0; virtual bool isFinished() const = 0; |