summaryrefslogtreecommitdiff
path: root/cpp/src/IceUtil/UUID.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceUtil/UUID.cpp')
-rw-r--r--cpp/src/IceUtil/UUID.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/cpp/src/IceUtil/UUID.cpp b/cpp/src/IceUtil/UUID.cpp
index 452ee3fffb0..0f14fd11b3b 100644
--- a/cpp/src/IceUtil/UUID.cpp
+++ b/cpp/src/IceUtil/UUID.cpp
@@ -47,7 +47,7 @@ public:
int p = GetCurrentProcessId();
#endif
myPid[0] = (p >> 8) & 0x7F;
- myPid[1] = p & 0xFF;
+ myPid[1] = static_cast<char>(p & 0xFF);
}
};
@@ -65,11 +65,11 @@ inline void halfByteToHex(unsigned char hb, char*& hexBuffer)
{
if(hb < 10)
{
- *hexBuffer++ = '0' + hb;
+ *hexBuffer++ = '0' + static_cast<char>(hb);
}
else
{
- *hexBuffer++ = 'A' + (hb - 10);
+ *hexBuffer++ = 'A' + static_cast<char>(hb - 10);
}
}
@@ -143,8 +143,8 @@ IceUtil::generateUUID()
//
// Replace the end of the node by myPid (15 bits)
//
- uuid.node[4] = (uuid.node[4] & 0x80) | myPid[0];
- uuid.node[5] = myPid[1];
+ uuid.node[4] = (uuid.node[4] & 0x80) | static_cast<unsigned char>(myPid[0]);
+ uuid.node[5] = static_cast<unsigned char>(myPid[1]);
//
// Convert to a UUID string