From: Amos Jeffries Date: Sat, 25 Jun 2016 15:23:43 +0000 (+1200) Subject: Restore old move-assignment definition X-Git-Tag: SQUID_4_0_13~39^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7007ee997abc4be6ca147a2e7dfdf5a826dcff2c;p=thirdparty%2Fsquid.git Restore old move-assignment definition We cannot use the compilers default move assignment operator since we have custom deletePointer() happening in the reset() call. --- diff --git a/src/security/LockingPointer.h b/src/security/LockingPointer.h index a5b2a43147..baaa32d345 100644 --- a/src/security/LockingPointer.h +++ b/src/security/LockingPointer.h @@ -69,7 +69,11 @@ public: // move semantics are definitely okay, when possible explicit LockingPointer(SelfType &&) = default; - SelfType &operator =(SelfType &&) = default; + SelfType &operator =(SelfType &&o) { + if (o.get() != raw) + reset(o.release()); + return *this; + } bool operator !() const { return !raw; } explicit operator bool() const { return raw; }