mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
WireDecoder ReadDouble: Use ref cast.
Change-Id: I47f23709960d13c005916b5d41d81339302adda5
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user