mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-12-26 08:51:21 -08:00
result: Check against self-assignment in ResultVal's copy assignment operator
Avoids doing work that doesn't need to be done.
This commit is contained in:
parent
be4c7ed082
commit
36e60c217a
@ -200,6 +200,9 @@ public:
|
||||
}
|
||||
|
||||
ResultVal& operator=(const ResultVal& o) {
|
||||
if (this == &o) {
|
||||
return *this;
|
||||
}
|
||||
if (!empty()) {
|
||||
if (!o.empty()) {
|
||||
object = o.object;
|
||||
|
Loading…
Reference in New Issue
Block a user