summaryrefslogtreecommitdiff
path: root/zdeflate.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-06-03 06:32:24 -0400
committerJeffrey Walton <noloader@gmail.com>2019-06-03 06:32:24 -0400
commit0a20141f36e951da87dce0c0be6dd018d8865330 (patch)
tree50fb42c2722ebc58a37c74d196e4eecc4acddbb1 /zdeflate.cpp
parent54d48ac1f4d6216005b17f4e3da63de55a3c0409 (diff)
downloadcryptopp-git-0a20141f36e951da87dce0c0be6dd018d8865330.tar.gz
Clear warning for assignment operator in HuffmanNode
Diffstat (limited to 'zdeflate.cpp')
-rw-r--r--zdeflate.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/zdeflate.cpp b/zdeflate.cpp
index fcabe209..d9c05959 100644
--- a/zdeflate.cpp
+++ b/zdeflate.cpp
@@ -98,11 +98,17 @@ HuffmanEncoder::HuffmanEncoder(const unsigned int *codeBits, unsigned int nCodes
struct HuffmanNode
{
- // Coverity finding on uninitialized 'symbol' member
HuffmanNode()
: symbol(0), parent(0) {}
HuffmanNode(const HuffmanNode& rhs)
: symbol(rhs.symbol), parent(rhs.parent) {}
+ HuffmanNode& operator=(const HuffmanNode& rhs)
+ {
+ // No this guard
+ symbol = rhs.symbol;
+ parent = rhs.parent;
+ return *this;
+ }
size_t symbol;
union {size_t parent; unsigned depth, freq;};