------------------------------------------------------------------------------------------------
| 122 | |
| 123 | // ------------------------------------------------------------------------------------------------ |
| 124 | uint64_t ReadDoubleWord(const char* input, const char*& cursor, const char* end) { |
| 125 | const size_t k_to_read = sizeof(uint64_t); |
| 126 | if(Offset(cursor, end) < k_to_read) { |
| 127 | TokenizeError("cannot ReadDoubleWord, out of bounds",input, cursor); |
| 128 | } |
| 129 | |
| 130 | uint64_t dword /*= *reinterpret_cast<const uint64_t*>(cursor)*/; |
| 131 | ::memcpy( &dword, cursor, sizeof( uint64_t ) ); |
| 132 | AI_SWAP8(dword); |
| 133 | |
| 134 | cursor += k_to_read; |
| 135 | |
| 136 | return dword; |
| 137 | } |
| 138 | |
| 139 | // ------------------------------------------------------------------------------------------------ |
| 140 | uint8_t ReadByte(const char* input, const char*& cursor, const char* end) { |
no test coverage detected