diff options
| author | Tilka <tilkax@gmail.com> | 2024-10-11 20:28:06 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-11 20:28:06 +0100 |
| commit | d2a56b321fb8957c8bb13911ef2b60a89c244de4 (patch) | |
| tree | d140ff1fa93560952e0f2fc62c3c0e6ffc24896b /Source/Core/DiscIO/Blob.cpp | |
| parent | c1832d17f657ba885815f53881784ea12a87c532 (diff) | |
| parent | b6ec8ddc206ea8da474348e801758051d6470b79 (diff) | |
Merge pull request #13095 from mitaclaw/ranges-modernization-6-n
Ranges Algorithms Modernization - N
Diffstat (limited to 'Source/Core/DiscIO/Blob.cpp')
| -rw-r--r-- | Source/Core/DiscIO/Blob.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/Core/DiscIO/Blob.cpp b/Source/Core/DiscIO/Blob.cpp index aa83504fd3..96e4640dfd 100644 --- a/Source/Core/DiscIO/Blob.cpp +++ b/Source/Core/DiscIO/Blob.cpp @@ -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; @@ -204,7 +203,7 @@ u32 SectorReader::ReadChunk(u8* buffer, u64 chunk_num) { if (!GetBlock(block_num + i, buffer)) { - std::fill(buffer, buffer + (cnt_blocks - i) * m_block_size, 0u); + std::fill_n(buffer, (cnt_blocks - i) * m_block_size, 0u); return i; } buffer += m_block_size; |
