summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Lioncash2018-03-28 18:01:46 -0400
committerGravatar Lioncash2018-03-28 18:02:44 -0400
commit36e60c217a722ae3a63894a263db31e54223ad0c (patch)
treed06aea6c367b744b02a7d10e0c435b8337244b92 /src/core
parentMerge pull request #286 from N00byKing/citratoyuzuagain (diff)
downloadyuzu-36e60c217a722ae3a63894a263db31e54223ad0c.tar.gz
yuzu-36e60c217a722ae3a63894a263db31e54223ad0c.tar.xz
yuzu-36e60c217a722ae3a63894a263db31e54223ad0c.zip
result: Check against self-assignment in ResultVal's copy assignment operator
Avoids doing work that doesn't need to be done.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/result.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/hle/result.h b/src/core/hle/result.h
index 97fef7a48..052f49979 100644
--- a/src/core/hle/result.h
+++ b/src/core/hle/result.h
@@ -200,6 +200,9 @@ public:
200 } 200 }
201 201
202 ResultVal& operator=(const ResultVal& o) { 202 ResultVal& operator=(const ResultVal& o) {
203 if (this == &o) {
204 return *this;
205 }
203 if (!empty()) { 206 if (!empty()) {
204 if (!o.empty()) { 207 if (!o.empty()) {
205 object = o.object; 208 object = o.object;