| 434 | } |
| 435 | |
| 436 | bool GetUInt16(uint16_t* value) { |
| 437 | if (type_ != kUInt16) { |
| 438 | return false; |
| 439 | } |
| 440 | if (fsize_ == 0) { |
| 441 | return true; |
| 442 | } |
| 443 | if (offset_ + 2 > bsize_) { |
| 444 | return false; |
| 445 | } |
| 446 | memcpy(static_cast<void*>(value), buffer_, 2); |
| 447 | memrev16ifbe(static_cast<void*>(value)); |
| 448 | buffer_ += 2; |
| 449 | offset_ += 2; |
| 450 | return true; |
| 451 | } |
| 452 | |
| 453 | bool GetInt16(int16_t* value) { |
| 454 | if (type_ != kInt16) { |