summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-04-14 18:35:41 +0200
committerattilamolnar <attilamolnar@hush.com>2013-04-14 18:35:41 +0200
commit895554aebccbeeb45e2c469d0bafa1e0d85dd8fb (patch)
tree543357ea7b5af9a17ec56ba1e5db2d33f81cc2bf /include
parent0a9f710e25f22fa67276aa8d15a008a5341b0f2a (diff)
Use std::string internally in UIDGenerator, move UUID_LENGTH into the class as a constant
Diffstat (limited to 'include')
-rw-r--r--include/uid.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/uid.h b/include/uid.h
index 8be003628..772c8a716 100644
--- a/include/uid.h
+++ b/include/uid.h
@@ -18,13 +18,6 @@
#pragma once
-/**
- * This is the maximum length of a UUID (unique user identifier).
- * This length is set in compliance with TS6 protocol, and really should not be changed. Ever.
- * It allows for a lot of clients as-is. -- w00t.
- */
-#define UUID_LENGTH 10
-
class TestSuite;
class CoreExport UIDGenerator
@@ -33,13 +26,20 @@ class CoreExport UIDGenerator
/** Holds the current UID. Used to generate the next one.
*/
- char current_uid[UUID_LENGTH];
+ std::string current_uid;
/** Increments the current UID by one.
*/
void IncrementUID(unsigned int pos);
public:
+ /**
+ * This is the maximum length of a UUID (unique user identifier).
+ * This length is set in compliance with TS6 protocol, and really should not be changed. Ever.
+ * It allows for a lot of clients as-is. -- w00t.
+ */
+ static const unsigned int UUID_LENGTH = 9;
+
/** Initializes this UID generator with the given SID
* @param sid SID that conforms to InspIRCd::IsSID()
*/