mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 19:58:53 +00:00
Simplify std::copy
with std::copy_n
+ a surprise `std::memcpy` in VolumeVerifier.cpp.
This commit is contained in:
parent
2b22e6ffc9
commit
7c96762f5f
12 changed files with 16 additions and 19 deletions
|
@ -153,8 +153,7 @@ bool SectorReader::Read(u64 offset, u64 size, u8* out_ptr)
|
|||
u32 can_read = m_block_size * cache->num_blocks - read_offset;
|
||||
u32 was_read = static_cast<u32>(std::min<u64>(can_read, remain));
|
||||
|
||||
std::copy(cache->data.begin() + read_offset, cache->data.begin() + read_offset + was_read,
|
||||
out_ptr);
|
||||
std::copy_n(cache->data.begin() + read_offset, was_read, out_ptr);
|
||||
|
||||
offset += was_read;
|
||||
out_ptr += was_read;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue