summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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 "";