cast range types before writing
This commit is contained in:
parent
7c40861383
commit
b356d052b3
|
@ -56,11 +56,14 @@ void range::write_(PDU::Stream stream, const uint32_t& val) const
|
|||
{
|
||||
switch (type_.address_length) {
|
||||
case ONE:
|
||||
stream->writeType<uint8_t>(val);
|
||||
*stream << static_cast<uint8_t>(val);
|
||||
break;
|
||||
case TWO:
|
||||
stream->writeType<uint16_t>(val);
|
||||
*stream << static_cast<uint16_t>(val);
|
||||
break;
|
||||
case FOUR:
|
||||
stream->writeType<uint32_t>(val);
|
||||
*stream << val;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue