diff options
| author | JosJuice <josjuice@gmail.com> | 2026-04-18 21:02:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-18 21:02:30 +0200 |
| commit | 74bb80544e8776750ee918fd4574a5b8eefd9774 (patch) | |
| tree | 5ffec7ba44c2ef6f51e5f48fd4ba95c6fed51d09 /Source/Core/VideoCommon/ShaderCache.cpp | |
| parent | 5f2641ba4df22eeaa4357981f9a0e7fc54e43f3a (diff) | |
| parent | 95dec132030e72b74da6bc46966e4fe5e4e239c0 (diff) | |
Merge pull request #14565 from SuperSamus/cpp-argument-move-reference
Improve usage of std::move and const references parameters
Diffstat (limited to 'Source/Core/VideoCommon/ShaderCache.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/ShaderCache.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/ShaderCache.cpp b/Source/Core/VideoCommon/ShaderCache.cpp index 22a5437046..2627656d0d 100644 --- a/Source/Core/VideoCommon/ShaderCache.cpp +++ b/Source/Core/VideoCommon/ShaderCache.cpp @@ -3,6 +3,8 @@ #include "VideoCommon/ShaderCache.h" +#include <utility> + #include <fmt/format.h> #include "Common/Assert.h" @@ -1018,8 +1020,8 @@ void ShaderCache::QueuePipelineCompile(const GXPipelineUid& uid, u32 priority) class PipelineWorkItem final : public AsyncShaderCompiler::WorkItem { public: - PipelineWorkItem(ShaderCache* shader_cache_, const GXPipelineUid& uid_, u32 priority_) - : shader_cache(shader_cache_), uid(uid_), priority(priority_) + PipelineWorkItem(ShaderCache* shader_cache_, GXPipelineUid uid_, u32 priority_) + : shader_cache(shader_cache_), uid(std::move(uid_)), priority(priority_) { // Check if all the stages required for this pipeline have been compiled. // If not, this work item becomes a no-op, and re-queues the pipeline for the next frame. @@ -1090,8 +1092,8 @@ void ShaderCache::QueueUberPipelineCompile(const GXUberPipelineUid& uid, u32 pri class UberPipelineWorkItem final : public AsyncShaderCompiler::WorkItem { public: - UberPipelineWorkItem(ShaderCache* shader_cache_, const GXUberPipelineUid& uid_, u32 priority_) - : shader_cache(shader_cache_), uid(uid_), priority(priority_) + UberPipelineWorkItem(ShaderCache* shader_cache_, GXUberPipelineUid uid_, u32 priority_) + : shader_cache(shader_cache_), uid(std::move(uid_)), priority(priority_) { // Check if all the stages required for this UberPipeline have been compiled. // If not, this work item becomes a no-op, and re-queues the UberPipeline for the next frame. |
