summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-06-12 20:30:12 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-06-12 20:30:12 (GMT)
commit8a89ec2184fdb27b86c813bdbc0ce5d138f692ac (patch)
tree0e536362bc73a50f3a2447bc50e951937cc23fd5 /Swiften
parente98dc394d7c6e3c5ab5e05a6e1430c4ec7f9a803 (diff)
downloadswift-8a89ec2184fdb27b86c813bdbc0ce5d138f692ac.zip
swift-8a89ec2184fdb27b86c813bdbc0ce5d138f692ac.tar.bz2
Replace explicit new by make_shared.
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Parser/SerializingParser.cpp5
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());