aboutsummaryrefslogtreecommitdiff
path: root/zencore/uid.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-19 18:38:31 +0200
committerStefan Boberg <[email protected]>2021-09-19 18:38:31 +0200
commited9d27f5e7b2e8eda835e67af302f097e5932366 (patch)
tree6bcdffd7829290a6c6bbc03b466457fc7b37064a /zencore/uid.cpp
parentRemoved unnecessary ATL includes (diff)
downloadzen-ed9d27f5e7b2e8eda835e67af302f097e5932366.tar.xz
zen-ed9d27f5e7b2e8eda835e67af302f097e5932366.zip
Added GetSessionIdString() which returns a text representation of the session id
Diffstat (limited to 'zencore/uid.cpp')
-rw-r--r--zencore/uid.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/zencore/uid.cpp b/zencore/uid.cpp
index d946638ec..ed00b1814 100644
--- a/zencore/uid.cpp
+++ b/zencore/uid.cpp
@@ -91,10 +91,16 @@ Oid::FromMemory(const void* Ptr)
return Id;
}
+void
+Oid::ToString(char OutString[StringLength])
+{
+ ToHexBytes(reinterpret_cast<const uint8_t*>(OidBits), sizeof(Oid::OidBits), OutString);
+}
+
StringBuilderBase&
Oid::ToString(StringBuilderBase& OutString) const
{
- char str[25];
+ char str[StringLength + 1];
ToHexBytes(reinterpret_cast<const uint8_t*>(OidBits), sizeof(Oid::OidBits), str);
str[2 * sizeof(Oid)] = '\0';