src/uuid.cpp

changeset 2
2bdc3ac5e77c
equal deleted inserted replaced
1:51d14b0c68c0 2:2bdc3ac5e77c
1 #include "uuid.h"
2 #include <QIODevice>
3
4 void uuidToString(const Uuid &uuid, QTextStream &stream)
5 {
6 stream << "0x";
7 stream << QString::number(uuid.a, 16);
8 stream << QString::number(uuid.b, 16);
9 }
10
11 void incrementUuid(Uuid &uuid)
12 {
13 if (uuid.b == std::numeric_limits<decltype(uuid.b)>::max())
14 {
15 uuid.a += 1;
16 uuid.b = 0;
17 }
18 else
19 {
20 uuid.b += 1;
21 }
22 }

mercurial