diff options
Diffstat (limited to 'Swiften/Elements/IQ.cpp')
-rw-r--r-- | Swiften/Elements/IQ.cpp | 12 |
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; } |