diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-02-14 18:57:18 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-02-14 21:36:32 (GMT) |
commit | cb05f5a908e20006c954ce38755c2e422ecc2388 (patch) | |
tree | a793551a5fe279a57d4330119560e8542f745484 /Swiften/Serializer/PayloadSerializers/ErrorSerializer.cpp | |
parent | cad974b45c0fb9355e68d9728e42c9ae3dbcebc7 (diff) | |
download | swift-contrib-cb05f5a908e20006c954ce38755c2e422ecc2388.zip swift-contrib-cb05f5a908e20006c954ce38755c2e422ecc2388.tar.bz2 |
Removed Swift::String.
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/ErrorSerializer.cpp')
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/ErrorSerializer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/ErrorSerializer.cpp b/Swiften/Serializer/PayloadSerializers/ErrorSerializer.cpp index d041f6e..15d13d7 100644 --- a/Swiften/Serializer/PayloadSerializers/ErrorSerializer.cpp +++ b/Swiften/Serializer/PayloadSerializers/ErrorSerializer.cpp @@ -12,8 +12,8 @@ namespace Swift { ErrorSerializer::ErrorSerializer() : GenericPayloadSerializer<ErrorPayload>() { } -String ErrorSerializer::serializePayload(boost::shared_ptr<ErrorPayload> error) const { - String result("<error type=\""); +std::string ErrorSerializer::serializePayload(boost::shared_ptr<ErrorPayload> error) const { + std::string result("<error type=\""); switch (error->getType()) { case ErrorPayload::Continue: result += "continue"; break; case ErrorPayload::Modify: result += "modify"; break; @@ -23,7 +23,7 @@ String ErrorSerializer::serializePayload(boost::shared_ptr<ErrorPayload> error) } result += "\">"; - String conditionElement; + std::string conditionElement; switch (error->getCondition()) { case ErrorPayload::BadRequest: conditionElement = "bad-request"; break; case ErrorPayload::Conflict: conditionElement = "conflict"; break; @@ -50,7 +50,7 @@ String ErrorSerializer::serializePayload(boost::shared_ptr<ErrorPayload> error) } result += "<" + conditionElement + " xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\"/>"; - if (!error->getText().isEmpty()) { + if (!error->getText().empty()) { XMLTextNode textNode(error->getText()); result += "<text xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\">" + textNode.serialize() + "</text>"; } |