2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #4463 from lioncash/lockdiscard

kernel/scheduler: Mark SchedulerLock constructor as nodiscard
This commit is contained in:
bunnei 2020-08-15 01:31:23 -04:00 committed by GitHub
commit 2aabd1eb05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -39,7 +39,7 @@ public:
class Scoped { class Scoped {
public: public:
explicit Scoped(GraphicsContext& context_) : context(context_) { [[nodiscard]] explicit Scoped(GraphicsContext& context_) : context(context_) {
context.MakeCurrent(); context.MakeCurrent();
} }
~Scoped() { ~Scoped() {
@ -52,7 +52,7 @@ public:
/// Calls MakeCurrent on the context and calls DoneCurrent when the scope for the returned value /// Calls MakeCurrent on the context and calls DoneCurrent when the scope for the returned value
/// ends /// ends
Scoped Acquire() { [[nodiscard]] Scoped Acquire() {
return Scoped{*this}; return Scoped{*this};
} }
}; };

View file

@ -289,7 +289,7 @@ private:
class SchedulerLock { class SchedulerLock {
public: public:
explicit SchedulerLock(KernelCore& kernel); [[nodiscard]] explicit SchedulerLock(KernelCore& kernel);
~SchedulerLock(); ~SchedulerLock();
protected: protected: