diff options
| author | 2020-08-15 01:31:23 -0400 | |
|---|---|---|
| committer | 2020-08-15 01:31:23 -0400 | |
| commit | 2aabd1eb05b00ce4231a385bf8d7deb130d8f088 (patch) | |
| tree | 1ea6f6e392dbef18c1231fe903ab8106fc5cac4f /src | |
| parent | Merge pull request #4416 from lioncash/span (diff) | |
| parent | emu_window: Mark Scoped constructor and Acquire() as nodiscard (diff) | |
| download | yuzu-2aabd1eb05b00ce4231a385bf8d7deb130d8f088.tar.gz yuzu-2aabd1eb05b00ce4231a385bf8d7deb130d8f088.tar.xz yuzu-2aabd1eb05b00ce4231a385bf8d7deb130d8f088.zip | |
Merge pull request #4463 from lioncash/lockdiscard
kernel/scheduler: Mark SchedulerLock constructor as nodiscard
Diffstat (limited to '')
| -rw-r--r-- | src/core/frontend/emu_window.h | 4 | ||||
| -rw-r--r-- | src/core/hle/kernel/scheduler.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/frontend/emu_window.h b/src/core/frontend/emu_window.h index 13aa14934..3e8780243 100644 --- a/src/core/frontend/emu_window.h +++ b/src/core/frontend/emu_window.h | |||
| @@ -39,7 +39,7 @@ public: | |||
| 39 | 39 | ||
| 40 | class Scoped { | 40 | class Scoped { |
| 41 | public: | 41 | public: |
| 42 | explicit Scoped(GraphicsContext& context_) : context(context_) { | 42 | [[nodiscard]] explicit Scoped(GraphicsContext& context_) : context(context_) { |
| 43 | context.MakeCurrent(); | 43 | context.MakeCurrent(); |
| 44 | } | 44 | } |
| 45 | ~Scoped() { | 45 | ~Scoped() { |
| @@ -52,7 +52,7 @@ public: | |||
| 52 | 52 | ||
| 53 | /// Calls MakeCurrent on the context and calls DoneCurrent when the scope for the returned value | 53 | /// Calls MakeCurrent on the context and calls DoneCurrent when the scope for the returned value |
| 54 | /// ends | 54 | /// ends |
| 55 | Scoped Acquire() { | 55 | [[nodiscard]] Scoped Acquire() { |
| 56 | return Scoped{*this}; | 56 | return Scoped{*this}; |
| 57 | } | 57 | } |
| 58 | }; | 58 | }; |
diff --git a/src/core/hle/kernel/scheduler.h b/src/core/hle/kernel/scheduler.h index b3b4b5169..36e3c26fb 100644 --- a/src/core/hle/kernel/scheduler.h +++ b/src/core/hle/kernel/scheduler.h | |||
| @@ -289,7 +289,7 @@ private: | |||
| 289 | 289 | ||
| 290 | class SchedulerLock { | 290 | class SchedulerLock { |
| 291 | public: | 291 | public: |
| 292 | explicit SchedulerLock(KernelCore& kernel); | 292 | [[nodiscard]] explicit SchedulerLock(KernelCore& kernel); |
| 293 | ~SchedulerLock(); | 293 | ~SchedulerLock(); |
| 294 | 294 | ||
| 295 | protected: | 295 | protected: |