diff options
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.cpp')
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.cpp b/Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.cpp index e2c6f59..03b3eb2 100644 --- a/Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.cpp +++ b/Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.cpp @@ -1,18 +1,19 @@ /* * Copyright (c) 2010 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ #include <Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.h> #include <boost/shared_ptr.hpp> +#include <boost/smart_ptr/make_shared.hpp> #include <Swiften/Base/foreach.h> #include <Swiften/Serializer/XML/XMLElement.h> #include <Swiften/Serializer/XML/XMLRawTextNode.h> #include <Swiften/Serializer/PayloadSerializers/FormSerializer.h> namespace Swift { DiscoInfoSerializer::DiscoInfoSerializer() : GenericPayloadSerializer<DiscoInfo>() { @@ -33,15 +34,15 @@ std::string DiscoInfoSerializer::serializePayload(boost::shared_ptr<DiscoInfo> d identityElement->setAttribute("type", identity.getType()); queryElement.addNode(identityElement); } foreach(const std::string& feature, discoInfo->getFeatures()) { boost::shared_ptr<XMLElement> featureElement(new XMLElement("feature")); featureElement->setAttribute("var", feature); queryElement.addNode(featureElement); } foreach(const Form::ref extension, discoInfo->getExtensions()) { - queryElement.addNode(boost::shared_ptr<XMLRawTextNode>(new XMLRawTextNode(FormSerializer().serialize(extension)))); + queryElement.addNode(boost::make_shared<XMLRawTextNode>(FormSerializer().serialize(extension))); } return queryElement.serialize(); } } |