summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Base/IDGenerator.cpp')
-rw-r--r--Swiften/Base/IDGenerator.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Swiften/Base/IDGenerator.cpp b/Swiften/Base/IDGenerator.cpp
index b620de7..74a0f65 100644
--- a/Swiften/Base/IDGenerator.cpp
+++ b/Swiften/Base/IDGenerator.cpp
@@ -11,16 +11,16 @@ namespace Swift {
IDGenerator::IDGenerator() {
}
-String IDGenerator::generateID() {
+std::string IDGenerator::generateID() {
bool carry = true;
size_t i = 0;
- while (carry && i < currentID_.getUTF8Size()) {
- char c = currentID_.getUTF8String()[i];
+ while (carry && i < currentID_.size()) {
+ char c = currentID_[i];
if (c >= 'z') {
- currentID_.getUTF8String()[i] = 'a';
+ currentID_[i] = 'a';
}
else {
- currentID_.getUTF8String()[i] = c+1;
+ currentID_[i] = c+1;
carry = false;
}
++i;