summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-09-28 17:42:54 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-09-28 17:43:38 (GMT)
commitbab047c1bef2936124db1346863a902e1064af12 (patch)
treec59de84a76581bd07713eb0591121e6a4aa04e7b /Swiften/QA/NetworkTest
parent7b8860c794419b63f827c9b87fbc469a1bcd58ef (diff)
downloadswift-contrib-bab047c1bef2936124db1346863a902e1064af12.zip
swift-contrib-bab047c1bef2936124db1346863a902e1064af12.tar.bz2
Pass read data from connection via shared_ptr.
This should avoid unnecessary copying of the received data while being processed by the event loop.
Diffstat (limited to 'Swiften/QA/NetworkTest')
-rw-r--r--Swiften/QA/NetworkTest/BoostConnectionTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Swiften/QA/NetworkTest/BoostConnectionTest.cpp b/Swiften/QA/NetworkTest/BoostConnectionTest.cpp
index 31d5d82..335f2d2 100644
--- a/Swiften/QA/NetworkTest/BoostConnectionTest.cpp
+++ b/Swiften/QA/NetworkTest/BoostConnectionTest.cpp
@@ -131,8 +131,8 @@ class BoostConnectionTest : public CppUnit::TestFixture {
connection->write(createSafeByteArray("\r\n\r\n")); // Temporarily, while we don't have an xmpp server running on ipv6
}
- void handleDataRead(const SafeByteArray& data) {
- append(receivedData, data);
+ void handleDataRead(boost::shared_ptr<SafeByteArray> data) {
+ append(receivedData, *data);
}
void handleDisconnected() {