summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-14 18:57:18 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-14 21:36:32 (GMT)
commitcb05f5a908e20006c954ce38755c2e422ecc2388 (patch)
treea793551a5fe279a57d4330119560e8542f745484 /Swiften/IDN/StringPrep.cpp
parentcad974b45c0fb9355e68d9728e42c9ae3dbcebc7 (diff)
downloadswift-cb05f5a908e20006c954ce38755c2e422ecc2388.zip
swift-cb05f5a908e20006c954ce38755c2e422ecc2388.tar.bz2
Removed Swift::String.
Diffstat (limited to 'Swiften/IDN/StringPrep.cpp')
-rw-r--r--Swiften/IDN/StringPrep.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Swiften/IDN/StringPrep.cpp b/Swiften/IDN/StringPrep.cpp
index d9e061e..ff01eed 100644
--- a/Swiften/IDN/StringPrep.cpp
+++ b/Swiften/IDN/StringPrep.cpp
@@ -8,6 +8,7 @@
#include <stringprep.h>
#include <vector>
+#include <cassert>
namespace Swift {
@@ -24,12 +25,12 @@ const Stringprep_profile* getLibIDNProfile(StringPrep::Profile profile) {
return 0;
}
-String StringPrep::getPrepared(const String& s, Profile profile) {
+std::string StringPrep::getPrepared(const std::string& s, Profile profile) {
- std::vector<char> input(s.getUTF8String().begin(), s.getUTF8String().end());
+ std::vector<char> input(s.begin(), s.end());
input.resize(MAX_STRINGPREP_SIZE);
if (stringprep(&input[0], MAX_STRINGPREP_SIZE, static_cast<Stringprep_profile_flags>(0), getLibIDNProfile(profile)) == 0) {
- return String(&input[0]);
+ return std::string(&input[0]);
}
else {
return "";