yuzu-emu
/
yuzu
Archived
1
0
Fork 0

Merge pull request #289 from lioncash/self-assign

result: Check against self-assignment in ResultVal's copy assignment operator
This commit is contained in:
bunnei 2018-03-29 09:03:41 -04:00 committed by GitHub
commit 4900c51864
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

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