summaryrefslogtreecommitdiff
path: root/src/core/hle/result.h
diff options
context:
space:
mode:
authorGravatar Morph2021-10-28 03:58:41 -0400
committerGravatar Morph2021-10-28 04:00:21 -0400
commit1b5c37fa298f594bfa4f8132b08d1a602d1e5513 (patch)
tree8e01768f01a96ac14acb8175f5f31b3cd8b06776 /src/core/hle/result.h
parenthle/result: Add move assignment operator in ResultVal (diff)
downloadyuzu-1b5c37fa298f594bfa4f8132b08d1a602d1e5513.tar.gz
yuzu-1b5c37fa298f594bfa4f8132b08d1a602d1e5513.tar.xz
yuzu-1b5c37fa298f594bfa4f8132b08d1a602d1e5513.zip
hle/result: Declare copy/move constructor/assignment as noexcept
While we're at it, we can also declare these copy/move constructor/assignment as noexcept.
Diffstat (limited to 'src/core/hle/result.h')
-rw-r--r--src/core/hle/result.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/result.h b/src/core/hle/result.h
index ffef46794..00fe70998 100644
--- a/src/core/hle/result.h
+++ b/src/core/hle/result.h
@@ -206,7 +206,7 @@ public:
206 return result; 206 return result;
207 } 207 }
208 208
209 ResultVal(const ResultVal& o) : result_code(o.result_code) { 209 ResultVal(const ResultVal& o) noexcept : result_code(o.result_code) {
210 if (!o.empty()) { 210 if (!o.empty()) {
211 new (&object) T(o.object); 211 new (&object) T(o.object);
212 } 212 }
@@ -224,7 +224,7 @@ public:
224 } 224 }
225 } 225 }
226 226
227 ResultVal& operator=(const ResultVal& o) { 227 ResultVal& operator=(const ResultVal& o) noexcept {
228 if (this == &o) { 228 if (this == &o) {
229 return *this; 229 return *this;
230 } 230 }
@@ -244,7 +244,7 @@ public:
244 return *this; 244 return *this;
245 } 245 }
246 246
247 ResultVal& operator=(ResultVal&& o) { 247 ResultVal& operator=(ResultVal&& o) noexcept {
248 if (this == &o) { 248 if (this == &o) {
249 return *this; 249 return *this;
250 } 250 }