diff options
Diffstat (limited to 'Swiften/Base/IDGenerator.cpp')
m--------- | Swiften | 0 | ||||
-rw-r--r-- | Swiften/Base/IDGenerator.cpp | 28 |
2 files changed, 0 insertions, 28 deletions
diff --git a/Swiften b/Swiften new file mode 160000 +Subproject 8213ba16d0043d2461f4b031c881d61dda5a38c diff --git a/Swiften/Base/IDGenerator.cpp b/Swiften/Base/IDGenerator.cpp deleted file mode 100644 index 07ead43..0000000 --- a/Swiften/Base/IDGenerator.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "Swiften/Base/IDGenerator.h" - -namespace Swift { - -IDGenerator::IDGenerator() { -} - -String IDGenerator::generateID() { - bool carry = true; - size_t i = 0; - while (carry && i < currentID_.getUTF8Size()) { - char c = currentID_.getUTF8String()[i]; - if (c >= 'z') { - currentID_.getUTF8String()[i] = 'a'; - } - else { - currentID_.getUTF8String()[i] = c+1; - carry = false; - } - ++i; - } - if (carry) { - currentID_ += 'a'; - } - return currentID_; -} - -} |