Browse Source
Merge pull request #4463 from lioncash/lockdiscard
kernel/scheduler: Mark SchedulerLock constructor as nodiscard
pull/15/merge
bunnei
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
3 additions and
3 deletions
-
src/core/frontend/emu_window.h
-
src/core/hle/kernel/scheduler.h
|
|
|
@ -39,7 +39,7 @@ public: |
|
|
|
|
|
|
|
class Scoped { |
|
|
|
public: |
|
|
|
explicit Scoped(GraphicsContext& context_) : context(context_) { |
|
|
|
[[nodiscard]] explicit Scoped(GraphicsContext& context_) : context(context_) { |
|
|
|
context.MakeCurrent(); |
|
|
|
} |
|
|
|
~Scoped() { |
|
|
|
@ -52,7 +52,7 @@ public: |
|
|
|
|
|
|
|
/// Calls MakeCurrent on the context and calls DoneCurrent when the scope for the returned value |
|
|
|
/// ends |
|
|
|
Scoped Acquire() { |
|
|
|
[[nodiscard]] Scoped Acquire() { |
|
|
|
return Scoped{*this}; |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
@ -289,7 +289,7 @@ private: |
|
|
|
|
|
|
|
class SchedulerLock { |
|
|
|
public: |
|
|
|
explicit SchedulerLock(KernelCore& kernel); |
|
|
|
[[nodiscard]] explicit SchedulerLock(KernelCore& kernel); |
|
|
|
~SchedulerLock(); |
|
|
|
|
|
|
|
protected: |
|
|
|
|