|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r84781 - trunk/boost/uuid
From: atompkins_at_[hidden]
Date: 2013-06-14 15:38:03
Author: atompkins
Date: 2013-06-14 15:38:03 EDT (Fri, 14 Jun 2013)
New Revision: 84781
URL: http://svn.boost.org/trac/boost/changeset/84781
Log:
Removed C4244 warning Ticket#8495
Text files modified:
trunk/boost/uuid/name_generator.hpp | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
Modified: trunk/boost/uuid/name_generator.hpp
==============================================================================
--- trunk/boost/uuid/name_generator.hpp Fri Jun 14 13:26:17 2013 (r84780)
+++ trunk/boost/uuid/name_generator.hpp 2013-06-14 15:38:03 EDT (Fri, 14 Jun 2013) (r84781)
@@ -71,10 +71,10 @@
for (size_t i=0; i<count; i++) {
uint32_t c = characters[i];
- sha.process_byte( (c >> 0) & 0xFF );
- sha.process_byte( (c >> 8) & 0xFF );
- sha.process_byte( (c >> 16) & 0xFF );
- sha.process_byte( (c >> 24) & 0xFF );
+ sha.process_byte(static_cast<unsigned char>((c >> 0) & 0xFF));
+ sha.process_byte(static_cast<unsigned char>((c >> 8) & 0xFF));
+ sha.process_byte(static_cast<unsigned char>((c >> 16) & 0xFF));
+ sha.process_byte(static_cast<unsigned char>((c >> 24) & 0xFF));
}
}
@@ -96,10 +96,10 @@
uuid u;
for (int i=0; i<4; ++i) {
- *(u.begin() + i*4+0) = ((digest[i] >> 24) & 0xFF);
- *(u.begin() + i*4+1) = ((digest[i] >> 16) & 0xFF);
- *(u.begin() + i*4+2) = ((digest[i] >> 8) & 0xFF);
- *(u.begin() + i*4+3) = ((digest[i] >> 0) & 0xFF);
+ *(u.begin() + i*4+0) = static_cast<uint8_t>((digest[i] >> 24) & 0xFF);
+ *(u.begin() + i*4+1) = static_cast<uint8_t>((digest[i] >> 16) & 0xFF);
+ *(u.begin() + i*4+2) = static_cast<uint8_t>((digest[i] >> 8) & 0xFF);
+ *(u.begin() + i*4+3) = static_cast<uint8_t>((digest[i] >> 0) & 0xFF);
}
// set variant
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk