Browse Source

result: Check against self-assignment in ResultVal's copy assignment operator

Avoids doing work that doesn't need to be done.
nce_cpp
Lioncash 8 years ago
parent
commit
e6375771e2
  1. 3
      src/core/hle/result.h

3
src/core/hle/result.h

@ -200,6 +200,9 @@ public:
}
ResultVal& operator=(const ResultVal& o) {
if (this == &o) {
return *this;
}
if (!empty()) {
if (!o.empty()) {
object = o.object;

Loading…
Cancel
Save