| 400 | |
| 401 | |
| 402 | bool BinaryReader::TryReadBEPointer(uint64_t& result) |
| 403 | { |
| 404 | size_t addressSize = m_view->GetAddressSize(); |
| 405 | switch (addressSize) |
| 406 | { |
| 407 | case 1: |
| 408 | { |
| 409 | uint8_t r; |
| 410 | if (!BNRead8(m_stream, &r)) |
| 411 | return false; |
| 412 | result = r; |
| 413 | break; |
| 414 | } |
| 415 | case 2: |
| 416 | { |
| 417 | uint16_t r; |
| 418 | if (!BNReadBE16(m_stream, &r)) |
| 419 | return false; |
| 420 | result = r; |
| 421 | break; |
| 422 | } |
| 423 | case 4: |
| 424 | { |
| 425 | uint32_t r; |
| 426 | if (!BNReadBE32(m_stream, &r)) |
| 427 | return false; |
| 428 | result = r; |
| 429 | break; |
| 430 | } |
| 431 | case 8: |
| 432 | { |
| 433 | if (!BNReadBE64(m_stream, &result)) |
| 434 | return false; |
| 435 | break; |
| 436 | } |
| 437 | default: |
| 438 | { |
| 439 | return false; |
| 440 | } |
| 441 | } |
| 442 | return true; |
| 443 | } |
| 444 | |
| 445 | |
| 446 | uint64_t BinaryReader::GetOffset() const |
nothing calls this directly
no test coverage detected