WireDecoder ReadDouble: Use ref cast.

Change-Id: I47f23709960d13c005916b5d41d81339302adda5
This commit is contained in:
Peter Johnson
2015-07-04 10:49:57 -07:00
parent c1c0c8d418
commit a55b6565b8

View File

@@ -42,7 +42,7 @@ static double ReadDouble(char*& buf) {
val <<= 8;
val |= (*((unsigned char*)buf)) & 0xff;
++buf;
return *reinterpret_cast<double*>(&val);
return reinterpret_cast<double&>(val);
}
WireDecoder::WireDecoder(raw_istream& is, unsigned int proto_rev) : m_is(is) {