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/Queries/UnitTest/ResponderTest.cpp
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/Queries/UnitTest/ResponderTest.cpp')
-rw-r--r--Swiften/Queries/UnitTest/ResponderTest.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Swiften/Queries/UnitTest/ResponderTest.cpp b/Swiften/Queries/UnitTest/ResponderTest.cpp
index a256346..6d40b6c 100644
--- a/Swiften/Queries/UnitTest/ResponderTest.cpp
+++ b/Swiften/Queries/UnitTest/ResponderTest.cpp
@@ -7,6 +7,7 @@
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <boost/shared_ptr.hpp>
+#include <boost/smart_ptr/make_shared.hpp>
#include <boost/bind.hpp>
#include <Swiften/Queries/Responder.h>
@@ -32,7 +33,7 @@ class ResponderTest : public CppUnit::TestFixture {
void setUp() {
channel_ = new DummyIQChannel();
router_ = new IQRouter(channel_);
- payload_ = boost::shared_ptr<SoftwareVersion>(new SoftwareVersion("foo"));
+ payload_ = boost::make_shared<SoftwareVersion>("foo");
}
void tearDown() {
@@ -108,7 +109,7 @@ class ResponderTest : public CppUnit::TestFixture {
void testHandleIQ_NoPayload() {
MyResponder testling(router_);
- CPPUNIT_ASSERT(!dynamic_cast<IQHandler*>(&testling)->handleIQ(boost::shared_ptr<IQ>(new IQ(IQ::Get))));
+ CPPUNIT_ASSERT(!dynamic_cast<IQHandler*>(&testling)->handleIQ(boost::make_shared<IQ>(IQ::Get)));
CPPUNIT_ASSERT_EQUAL(0, static_cast<int>(testling.getPayloads_.size()));
CPPUNIT_ASSERT_EQUAL(0, static_cast<int>(testling.setPayloads_.size()));