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 /Slimber
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 'Slimber')
-rw-r--r--Slimber/FileVCardCollection.cpp3
-rw-r--r--Slimber/Server.cpp2
-rw-r--r--Slimber/UnitTest/LinkLocalPresenceManagerTest.cpp2
3 files changed, 4 insertions, 3 deletions
diff --git a/Slimber/FileVCardCollection.cpp b/Slimber/FileVCardCollection.cpp
index 97ade08..24249d4 100644
--- a/Slimber/FileVCardCollection.cpp
+++ b/Slimber/FileVCardCollection.cpp
@@ -6,6 +6,7 @@
#include "Slimber/FileVCardCollection.h"
+#include <boost/smart_ptr/make_shared.hpp>
#include <boost/filesystem/fstream.hpp>
#include <Swiften/Base/ByteArray.h>
@@ -30,7 +31,7 @@ boost::shared_ptr<VCard> FileVCardCollection::getOwnVCard() const {
return boost::dynamic_pointer_cast<VCard>(parser.getPayload());
}
else {
- return boost::shared_ptr<VCard>(new VCard());
+ return boost::make_shared<VCard>();
}
}
diff --git a/Slimber/Server.cpp b/Slimber/Server.cpp
index 769217f..b63ca67 100644
--- a/Slimber/Server.cpp
+++ b/Slimber/Server.cpp
@@ -327,7 +327,7 @@ void Server::registerLinkLocalSession(boost::shared_ptr<Session> session) {
session->onElementReceived.connect(
boost::bind(&Server::handleLinkLocalElementReceived, this, _1, session));
linkLocalSessions.push_back(session);
- //tracers.push_back(boost::shared_ptr<SessionTracer>(new SessionTracer(session)));
+ //tracers.push_back(boost::make_shared<SessionTracer>(session));
session->startSession();
}
diff --git a/Slimber/UnitTest/LinkLocalPresenceManagerTest.cpp b/Slimber/UnitTest/LinkLocalPresenceManagerTest.cpp
index e45861b..c138b2c 100644
--- a/Slimber/UnitTest/LinkLocalPresenceManagerTest.cpp
+++ b/Slimber/UnitTest/LinkLocalPresenceManagerTest.cpp
@@ -42,7 +42,7 @@ class LinkLocalPresenceManagerTest : public CppUnit::TestFixture {
public:
void setUp() {
eventLoop = new DummyEventLoop();
- querier = boost::shared_ptr<FakeDNSSDQuerier>(new FakeDNSSDQuerier("wonderland.lit", eventLoop));
+ querier = boost::make_shared<FakeDNSSDQuerier>("wonderland.lit", eventLoop);
browser = new LinkLocalServiceBrowser(querier);
browser->start();
}