ResultVal: Fixed compilation when reassigning a ResultVal.
This commit is contained in:
parent
3f1a3952d7
commit
ca1a87ef7d
1 changed files with 3 additions and 3 deletions
|
@ -307,14 +307,14 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultVal& operator=(const ResultVal& o) {
|
ResultVal& operator=(const ResultVal& o) {
|
||||||
if (*this) {
|
if (!empty()) {
|
||||||
if (o) {
|
if (!o.empty()) {
|
||||||
*GetPointer() = *o.GetPointer();
|
*GetPointer() = *o.GetPointer();
|
||||||
} else {
|
} else {
|
||||||
GetPointer()->~T();
|
GetPointer()->~T();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (o) {
|
if (!o.empty()) {
|
||||||
new (&storage) T(*o.GetPointer());
|
new (&storage) T(*o.GetPointer());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue