summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Elements/IQ.cpp')
-rw-r--r--Swiften/Elements/IQ.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Swiften/Elements/IQ.cpp b/Swiften/Elements/IQ.cpp
index 2c9c763..0f452ef 100644
--- a/Swiften/Elements/IQ.cpp
+++ b/Swiften/Elements/IQ.cpp
@@ -6,11 +6,13 @@
#include <Swiften/Elements/IQ.h>
+#include <boost/smart_ptr/make_shared.hpp>
+
namespace Swift {
boost::shared_ptr<IQ> IQ::createRequest(
Type type, const JID& to, const std::string& id, boost::shared_ptr<Payload> payload) {
- boost::shared_ptr<IQ> iq(new IQ(type));
+ boost::shared_ptr<IQ> iq = boost::make_shared<IQ>(type);
if (to.isValid()) {
iq->setTo(to);
}