diff options
author | Jeffrey Walton <noloader@gmail.com> | 2015-07-30 13:24:37 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2015-07-30 13:24:37 -0400 |
commit | 8293570bd454d978ae0653826655a4aa559e352e (patch) | |
tree | 268823741a0e1fc80017cc66fff4057881299838 /queue.cpp | |
parent | 77206baf56e6feb111f54678038307ac216128d5 (diff) | |
download | cryptopp-git-8293570bd454d978ae0653826655a4aa559e352e.tar.gz |
Added self-assignment guards or comment indicating why the check is not needed
Diffstat (limited to 'queue.cpp')
-rw-r--r-- | queue.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -428,17 +428,17 @@ byte * ByteQueue::CreatePutSpace(size_t &size) ByteQueue & ByteQueue::operator=(const ByteQueue &rhs) { - if (this == &rhs) return *this; - - Destroy(); - CopyFrom(rhs); + if (this != &rhs) + { + Destroy(); + CopyFrom(rhs); + } return *this; } bool ByteQueue::operator==(const ByteQueue &rhs) const { const lword currentSize = CurrentSize(); - if (currentSize != rhs.CurrentSize()) return false; |