src/uuid.cpp

changeset 6
73e448b2943d
parent 5
593a658cba8e
child 7
68443f5be176
equal deleted inserted replaced
5:593a658cba8e 6:73e448b2943d
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