| 62 | } |
| 63 | |
| 64 | int64 MemoryReader::read(void* dst, const int64 size) |
| 65 | { |
| 66 | if (not dst) |
| 67 | { |
| 68 | return 0; |
| 69 | } |
| 70 | |
| 71 | const int64 readSize = Clamp<int64>(size, 0, (m_blob.size() - m_pos)); |
| 72 | |
| 73 | std::memcpy(dst, (m_blob.data() + m_pos), static_cast<size_t>(readSize)); |
| 74 | |
| 75 | m_pos += readSize; |
| 76 | |
| 77 | return readSize; |
| 78 | } |
| 79 | |
| 80 | int64 MemoryReader::read(void* dst, const int64 pos, const int64 size) |
| 81 | { |