From 8a89ec2184fdb27b86c813bdbc0ce5d138f692ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be> Date: Sun, 12 Jun 2011 22:30:12 +0200 Subject: Replace explicit new by make_shared. diff --git a/Swiften/Parser/SerializingParser.cpp b/Swiften/Parser/SerializingParser.cpp index 096ffc1..25c2ec6 100644 --- a/Swiften/Parser/SerializingParser.cpp +++ b/Swiften/Parser/SerializingParser.cpp @@ -5,6 +5,9 @@ */ #include <Swiften/Parser/SerializingParser.h> + +#include <boost/smart_ptr/make_shared.hpp> + #include <Swiften/Serializer/XML/XMLTextNode.h> #include <Swiften/Base/foreach.h> @@ -14,7 +17,7 @@ SerializingParser::SerializingParser() { } void SerializingParser::handleStartElement(const std::string& tag, const std::string& ns, const AttributeMap& attributes) { - boost::shared_ptr<XMLElement> element(new XMLElement(tag, ns)); + boost::shared_ptr<XMLElement> element = boost::make_shared<XMLElement>(tag, ns); // FIXME: Ignoring attribute namespace foreach (const AttributeMap::Entry& e, attributes.getEntries()) { element->setAttribute(e.getAttribute().getName(), e.getValue()); -- cgit v0.10.2-6-g49f6