Merge branch 'v0.21.x' into master
This commit is contained in:
@@ -243,4 +243,15 @@ ToLE64(uint64_t value) noexcept
|
||||
return IsLittleEndian() ? value : ByteSwap64(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a 16 bit integer from little endian to the host byte order
|
||||
* and returns it as a signed integer.
|
||||
*/
|
||||
constexpr int16_t
|
||||
FromLE16S(uint16_t value) noexcept
|
||||
{
|
||||
/* assuming two's complement representation */
|
||||
return static_cast<int16_t>(FromLE16(value));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user