diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-05-02 20:05:08 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-05-02 20:19:31 (GMT) |
commit | 7d2074bc046c38cf6947da77e1b9610c1809217d (patch) | |
tree | 3ddb60ea83873023db964b8353c58ffb5d7df250 /Swiften/Serializer/PayloadSerializers | |
parent | 68a93082f7ff8ede37112bf9c6cb34ad2986c6c8 (diff) | |
download | swift-7d2074bc046c38cf6947da77e1b9610c1809217d.zip swift-7d2074bc046c38cf6947da77e1b9610c1809217d.tar.bz2 |
Add a generic erase() algorithm.
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers')
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/FormSerializer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/FormSerializer.cpp b/Swiften/Serializer/PayloadSerializers/FormSerializer.cpp index eae4c02..7a6bb79 100644 --- a/Swiften/Serializer/PayloadSerializers/FormSerializer.cpp +++ b/Swiften/Serializer/PayloadSerializers/FormSerializer.cpp @@ -11,6 +11,7 @@ #include <string> #include <Swiften/Base/String.h> +#include <Swiften/Base/Algorithm.h> #include <Swiften/Base/foreach.h> #include <Swiften/Serializer/XML/XMLTextNode.h> #include <Swiften/Serializer/XML/XMLRawTextNode.h> @@ -154,7 +155,7 @@ boost::shared_ptr<XMLElement> FormSerializer::fieldToXML(boost::shared_ptr<FormF void FormSerializer::multiLineify(const std::string& text, const std::string& elementName, boost::shared_ptr<XMLElement> element) const { std::string unRdText(text); - unRdText.erase(std::remove(unRdText.begin(), unRdText.end(), '\r'), unRdText.end()); + erase(unRdText, '\r'); std::vector<std::string> lines = String::split(unRdText, '\n'); foreach (std::string line, lines) { boost::shared_ptr<XMLElement> lineElement(new XMLElement(elementName)); |