aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/shader/async_shaders.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-08-24 01:15:48 -0400
committerLioncash <mathew1800@gmail.com>2020-08-24 01:15:50 -0400
commite95290cfaf6cdd1c7f74ebf7af2ec084cd78b912 (patch)
tree5fa0b4532611efd8e0e9cd32200bc237eaffd4d5 /src/video_core/shader/async_shaders.cpp
parent6d5e0def0d16080991bef68d867caaa7d3b55450 (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.cpp6
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 f815584f72..aabd62c5c2 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()),