summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Base/SimpleIDGenerator.cpp')
-rw-r--r--Swiften/Base/SimpleIDGenerator.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/Swiften/Base/SimpleIDGenerator.cpp b/Swiften/Base/SimpleIDGenerator.cpp
index 97d59f9..072dd39 100644
--- a/Swiften/Base/SimpleIDGenerator.cpp
+++ b/Swiften/Base/SimpleIDGenerator.cpp
@@ -12,23 +12,23 @@ SimpleIDGenerator::SimpleIDGenerator() {
}
std::string SimpleIDGenerator::generateID() {
- bool carry = true;
- size_t i = 0;
- while (carry && i < currentID.size()) {
- char c = currentID[i];
- if (c >= 'z') {
- currentID[i] = 'a';
- }
- else {
- currentID[i] = c+1;
- carry = false;
- }
- ++i;
- }
- if (carry) {
- currentID += 'a';
- }
- return currentID;
+ bool carry = true;
+ size_t i = 0;
+ while (carry && i < currentID.size()) {
+ char c = currentID[i];
+ if (c >= 'z') {
+ currentID[i] = 'a';
+ }
+ else {
+ currentID[i] = c+1;
+ carry = false;
+ }
+ ++i;
+ }
+ if (carry) {
+ currentID += 'a';
+ }
+ return currentID;
}
}