mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 19:55:46 +00:00
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:
parent
b72d2069ba
commit
bafef3d1c9
2 changed files with 15 additions and 17 deletions
|
@ -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()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue