mm_io_c: add read_int64_be()

This commit is contained in:
Moritz Bunkus 2013-04-14 11:50:45 +02:00
parent 81ae6c52d8
commit 8380e406e1
2 changed files with 6 additions and 0 deletions

View File

@ -355,6 +355,11 @@ mm_io_c::read_uint16_be() {
return get_uint16_be(buffer);
}
int32_t
mm_io_c::read_int24_be() {
return (static_cast<int32_t>(read_uint24_be()) + 0xff800000) ^ 0xff800000;
}
uint32_t
mm_io_c::read_uint24_be() {
unsigned char buffer[3];

View File

@ -53,6 +53,7 @@ public:
virtual uint32_t read_uint32_le();
virtual uint64_t read_uint64_le();
virtual uint16_t read_uint16_be();
virtual int32_t read_int24_be();
virtual uint32_t read_uint24_be();
virtual uint32_t read_uint32_be();
virtual uint64_t read_uint64_be();