summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2012-03-20 00:05:55 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-03-20 19:13:43 (GMT)
commit3d6694b0c698fff63d11f8bb4aa995c1df882315 (patch)
treea46ccace647f23a65100cf69c951345aa6dea7ab /Swiften/Client
parent3d27d98ccc232ae7bfacfd5a3f85f44b6c2e9cc9 (diff)
downloadswift-contrib-3d6694b0c698fff63d11f8bb4aa995c1df882315.zip
swift-contrib-3d6694b0c698fff63d11f8bb4aa995c1df882315.tar.bz2
boost::shared_ptr<?>(new ?(...)) -> boost::make_shared<?>(...) transformation where possible.
License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
Diffstat (limited to 'Swiften/Client')
-rw-r--r--Swiften/Client/UnitTest/ClientSessionTest.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/Swiften/Client/UnitTest/ClientSessionTest.cpp b/Swiften/Client/UnitTest/ClientSessionTest.cpp
index 22db8fc..a6d5a3a 100644
--- a/Swiften/Client/UnitTest/ClientSessionTest.cpp
+++ b/Swiften/Client/UnitTest/ClientSessionTest.cpp
@@ -66,7 +66,7 @@ class ClientSessionTest : public CppUnit::TestFixture {
public:
void setUp() {
- server = boost::shared_ptr<MockSessionStream>(new MockSessionStream());
+ server = boost::make_shared<MockSessionStream>();
sessionFinishedReceived = false;
needCredentials = false;
blindCertificateTrustChecker = new BlindCertificateTrustChecker();
@@ -420,11 +420,11 @@ class ClientSessionTest : public CppUnit::TestFixture {
}
void breakConnection() {
- onClosed(boost::shared_ptr<SessionStream::Error>(new SessionStream::Error(SessionStream::Error::ConnectionReadError)));
+ onClosed(boost::make_shared<SessionStream::Error>(SessionStream::Error::ConnectionReadError));
}
void breakTLS() {
- onClosed(boost::shared_ptr<SessionStream::Error>(new SessionStream::Error(SessionStream::Error::TLSError)));
+ onClosed(boost::make_shared<SessionStream::Error>(SessionStream::Error::TLSError));
}
@@ -445,11 +445,11 @@ class ClientSessionTest : public CppUnit::TestFixture {
}
void sendTLSProceed() {
- onElementReceived(boost::shared_ptr<TLSProceed>(new TLSProceed()));
+ onElementReceived(boost::make_shared<TLSProceed>());
}
void sendTLSFailure() {
- onElementReceived(boost::shared_ptr<StartTLSFailure>(new StartTLSFailure()));
+ onElementReceived(boost::make_shared<StartTLSFailure>());
}
void sendStreamFeaturesWithMultipleAuthentication() {
@@ -484,19 +484,19 @@ class ClientSessionTest : public CppUnit::TestFixture {
}
void sendAuthSuccess() {
- onElementReceived(boost::shared_ptr<AuthSuccess>(new AuthSuccess()));
+ onElementReceived(boost::make_shared<AuthSuccess>());
}
void sendAuthFailure() {
- onElementReceived(boost::shared_ptr<AuthFailure>(new AuthFailure()));
+ onElementReceived(boost::make_shared<AuthFailure>());
}
void sendStreamManagementEnabled() {
- onElementReceived(boost::shared_ptr<StreamManagementEnabled>(new StreamManagementEnabled()));
+ onElementReceived(boost::make_shared<StreamManagementEnabled>());
}
void sendStreamManagementFailed() {
- onElementReceived(boost::shared_ptr<StreamManagementFailed>(new StreamManagementFailed()));
+ onElementReceived(boost::make_shared<StreamManagementFailed>());
}
void sendBindResult() {
@@ -755,7 +755,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION(ClientSessionTest);
processEvents();
getMockServer()->expectMessage();
- session->sendElement(boost::shared_ptr<Message>(new Message()));
+ session->sendElement(boost::make_shared<Message>()));
}
void testSendElement() {