more explicit constructors
[chaz/yoink] / src / Moof / Packet.cc
index bb8fcc7b88bb9a2413526c9a40ab8164b0b7e7e7..437438effd73803b814123f3bfbea4ab32c45be4 100644 (file)
@@ -182,22 +182,22 @@ Packet& Packet::operator<<(bool value)
 
 Packet& Packet::operator<<(int8_t value)
 {
-       return *this << (uint8_t)value;
+       return *this << reinterpret_cast<uint8_t&>(value);
 }
 
 Packet& Packet::operator<<(int16_t value)
 {
-       return *this << (uint16_t)value;
+       return *this << reinterpret_cast<uint16_t&>(value);
 }
 
 Packet& Packet::operator<<(int32_t value)
 {
-       return *this << (uint32_t)value;
+       return *this << reinterpret_cast<uint32_t&>(value);
 }
 
 Packet& Packet::operator<<(int64_t value)
 {
-       return *this << (uint64_t)value;
+       return *this << reinterpret_cast<uint64_t&>(value);
 }
 
 
@@ -305,22 +305,22 @@ Packet& Packet::operator>>(bool& value)
 
 Packet& Packet::operator>>(int8_t& value)
 {
-       return *this >> (uint8_t&)value;
+       return *this >> reinterpret_cast<uint8_t&>(value);
 }
 
 Packet& Packet::operator>>(int16_t& value)
 {
-       return *this >> (uint16_t&)value;
+       return *this >> reinterpret_cast<uint16_t&>(value);
 }
 
 Packet& Packet::operator>>(int32_t& value)
 {
-       return *this >> (uint32_t&)value;
+       return *this >> reinterpret_cast<uint32_t&>(value);
 }
 
 Packet& Packet::operator>>(int64_t& value)
 {
-       return *this >> (uint64_t&)value;
+       return *this >> reinterpret_cast<uint64_t&>(value);
 }
 
 Packet& Packet::operator>>(uint8_t& value)
This page took 0.022725 seconds and 4 git commands to generate.