diff options
author | Mai M <mathew1800@gmail.com> | 2021-05-29 09:08:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-29 09:08:11 +0200 |
commit | 38dbe577972ed96133fab44f0f5d9a961fd7e1f7 (patch) | |
tree | c100df6aa459de10b6162ae8d446d26e9623d2ef /src | |
parent | Merge pull request #6371 from degasus/drop_ExceptionalExit (diff) | |
parent | Fix two GCC 11 warnings: Unneeded copies. (diff) | |
download | yuzu-38dbe577972ed96133fab44f0f5d9a961fd7e1f7.tar yuzu-38dbe577972ed96133fab44f0f5d9a961fd7e1f7.tar.gz yuzu-38dbe577972ed96133fab44f0f5d9a961fd7e1f7.tar.bz2 yuzu-38dbe577972ed96133fab44f0f5d9a961fd7e1f7.tar.lz yuzu-38dbe577972ed96133fab44f0f5d9a961fd7e1f7.tar.xz yuzu-38dbe577972ed96133fab44f0f5d9a961fd7e1f7.tar.zst yuzu-38dbe577972ed96133fab44f0f5d9a961fd7e1f7.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/kernel/kernel.cpp | 2 | ||||
-rw-r--r-- | src/video_core/buffer_cache/buffer_cache.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 8b55df82e..7ca2a2ef1 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -258,7 +258,7 @@ struct KernelCore::Impl { KAutoObject::Create(thread.get()); ASSERT(KThread::InitializeDummyThread(thread.get()).IsSuccess()); thread->SetName(fmt::format("DummyThread:{}", GetHostThreadId())); - return std::move(thread); + return thread; }; thread_local auto thread = make_thread(); diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index de971041f..9e6b87960 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -596,7 +596,7 @@ void BufferCache<P>::PopAsyncFlushes() { runtime.CopyBuffer(download_staging.buffer, slot_buffers[buffer_id], copies); } runtime.Finish(); - for (const auto [copy, buffer_id] : downloads) { + for (const auto& [copy, buffer_id] : downloads) { const Buffer& buffer = slot_buffers[buffer_id]; const VAddr cpu_addr = buffer.CpuAddr() + copy.src_offset; // Undo the modified offset @@ -606,7 +606,7 @@ void BufferCache<P>::PopAsyncFlushes() { } } else { const std::span<u8> immediate_buffer = ImmediateBuffer(largest_copy); - for (const auto [copy, buffer_id] : downloads) { + for (const auto& [copy, buffer_id] : downloads) { Buffer& buffer = slot_buffers[buffer_id]; buffer.ImmediateDownload(copy.src_offset, immediate_buffer.subspan(0, copy.size)); const VAddr cpu_addr = buffer.CpuAddr() + copy.src_offset; |