Simplify std::copy with std::copy_n

+ a surprise `std::memcpy` in VolumeVerifier.cpp.
This commit is contained in:
mitaclaw
2024-09-28 15:37:09 -07:00
parent 2b22e6ffc9
commit 7c96762f5f
12 changed files with 16 additions and 19 deletions

View File

@ -28,8 +28,8 @@ void Replace(u64 offset, u64 size, u8* out_ptr, u64 replace_offset, u64 replace_
if (replace_end > replace_start)
{
std::copy(replace_ptr + (replace_start - replace_offset),
replace_ptr + (replace_end - replace_offset), out_ptr + (replace_start - offset));
std::copy_n(replace_ptr + (replace_start - replace_offset), replace_end - replace_start,
out_ptr + (replace_start - offset));
}
}