diff options
Diffstat (limited to 'Swiften/Parser/SerializingParser.cpp')
-rw-r--r-- | Swiften/Parser/SerializingParser.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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()); |