async_shaders: Mark getters as const member functions

While we're at it, we can also mark them as nodiscard.
This commit is contained in:
Lioncash
2020-08-24 01:15:48 -04:00
parent b72d2069ba
commit bafef3d1c9
2 changed files with 15 additions and 17 deletions

View File

@ -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()),