summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-06-12 19:41:19 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-06-12 19:41:19 (GMT)
commit75025326ec13a76cb2a724380bf7569aa6dc6ecf (patch)
treef05bd81ad6177cda51f20e559745f62ac7d27ab9 /Swiften/Elements/IQ.cpp
parent29a83617e0a066ee0692d2bbcecc9335f73b8138 (diff)
downloadswift-75025326ec13a76cb2a724380bf7569aa6dc6ecf.zip
swift-75025326ec13a76cb2a724380bf7569aa6dc6ecf.tar.bz2
Replace explicit new with make_shared.
Diffstat (limited to 'Swiften/Elements/IQ.cpp')
-rw-r--r--Swiften/Elements/IQ.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Swiften/Elements/IQ.cpp b/Swiften/Elements/IQ.cpp
index 0f452ef..8e6d7cc 100644
--- a/Swiften/Elements/IQ.cpp
+++ b/Swiften/Elements/IQ.cpp
@@ -24,7 +24,7 @@ boost::shared_ptr<IQ> IQ::createRequest(
}
boost::shared_ptr<IQ> IQ::createResult(const JID& to, const std::string& id, boost::shared_ptr<Payload> payload) {
- boost::shared_ptr<IQ> iq(new IQ(Result));
+ boost::shared_ptr<IQ> iq = boost::make_shared<IQ>(Result);
iq->setTo(to);
iq->setID(id);
if (payload) {
@@ -34,7 +34,7 @@ boost::shared_ptr<IQ> IQ::createResult(const JID& to, const std::string& id, boo
}
boost::shared_ptr<IQ> IQ::createResult(const JID& to, const JID& from, const std::string& id, boost::shared_ptr<Payload> payload) {
- boost::shared_ptr<IQ> iq(new IQ(Result));
+ boost::shared_ptr<IQ> iq = boost::make_shared<IQ>(Result);
iq->setTo(to);
iq->setFrom(from);
iq->setID(id);
@@ -45,19 +45,19 @@ boost::shared_ptr<IQ> IQ::createResult(const JID& to, const JID& from, const std
}
boost::shared_ptr<IQ> IQ::createError(const JID& to, const std::string& id, ErrorPayload::Condition condition, ErrorPayload::Type type) {
- boost::shared_ptr<IQ> iq(new IQ(IQ::Error));
+ boost::shared_ptr<IQ> iq = boost::make_shared<IQ>(IQ::Error);
iq->setTo(to);
iq->setID(id);
- iq->addPayload(boost::shared_ptr<Swift::ErrorPayload>(new Swift::ErrorPayload(condition, type)));
+ iq->addPayload(boost::make_shared<Swift::ErrorPayload>(condition, type));
return iq;
}
boost::shared_ptr<IQ> IQ::createError(const JID& to, const JID& from, const std::string& id, ErrorPayload::Condition condition, ErrorPayload::Type type) {
- boost::shared_ptr<IQ> iq(new IQ(IQ::Error));
+ boost::shared_ptr<IQ> iq = boost::make_shared<IQ>(IQ::Error);
iq->setTo(to);
iq->setFrom(from);
iq->setID(id);
- iq->addPayload(boost::shared_ptr<Swift::ErrorPayload>(new Swift::ErrorPayload(condition, type)));
+ iq->addPayload(boost::make_shared<Swift::ErrorPayload>(condition, type));
return iq;
}