diff options
| author | Lioncash <mathew1800@gmail.com> | 2020-08-24 01:15:48 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2020-08-24 01:15:50 -0400 |
| commit | bafef3d1c98240085eb6ab8ed934221451c66c68 (patch) | |
| tree | 5fa0b4532611efd8e0e9cd32200bc237eaffd4d5 /src/video_core/shader/async_shaders.cpp | |
| parent | b72d2069babe9e7ec103e4bc1357cc474982a6df (diff) | |
async_shaders: Mark getters as const member functions
While we're at it, we can also mark them as nodiscard.
Diffstat (limited to 'src/video_core/shader/async_shaders.cpp')
| -rw-r--r-- | src/video_core/shader/async_shaders.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/shader/async_shaders.cpp b/src/video_core/shader/async_shaders.cpp index f815584f7..aabd62c5c 100644 --- a/src/video_core/shader/async_shaders.cpp +++ b/src/video_core/shader/async_shaders.cpp @@ -73,11 +73,11 @@ void AsyncShaders::KillWorkers() { worker_threads.clear(); } -bool AsyncShaders::HasWorkQueued() { +bool AsyncShaders::HasWorkQueued() const { return !pending_queue.empty(); } -bool AsyncShaders::HasCompletedWork() { +bool AsyncShaders::HasCompletedWork() const { std::shared_lock lock{completed_mutex}; return !finished_work.empty(); } @@ -102,7 +102,7 @@ bool AsyncShaders::IsShaderAsync(const Tegra::GPU& gpu) const { } std::vector<AsyncShaders::Result> AsyncShaders::GetCompletedWork() { - std::vector<AsyncShaders::Result> results; + std::vector<Result> results; { std::unique_lock lock{completed_mutex}; results.assign(std::make_move_iterator(finished_work.begin()), |
