| 99 | } |
| 100 | |
| 101 | int64 MemoryReader::lookahead(void* dst, const int64 size) const |
| 102 | { |
| 103 | if (not dst) |
| 104 | { |
| 105 | return 0; |
| 106 | } |
| 107 | |
| 108 | const int64 readSize = Clamp<int64>(size, 0, (m_blob.size() - m_pos)); |
| 109 | |
| 110 | std::memcpy(dst, (m_blob.data() + m_pos), static_cast<size_t>(readSize)); |
| 111 | |
| 112 | return readSize; |
| 113 | } |
| 114 | |
| 115 | int64 MemoryReader::lookahead(void* dst, const int64 pos, const int64 size) const |
| 116 | { |