diff options
author | Jeffrey Walton <noloader@gmail.com> | 2019-06-03 06:32:24 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2019-06-03 06:32:24 -0400 |
commit | 0a20141f36e951da87dce0c0be6dd018d8865330 (patch) | |
tree | 50fb42c2722ebc58a37c74d196e4eecc4acddbb1 /zdeflate.cpp | |
parent | 54d48ac1f4d6216005b17f4e3da63de55a3c0409 (diff) | |
download | cryptopp-git-0a20141f36e951da87dce0c0be6dd018d8865330.tar.gz |
Clear warning for assignment operator in HuffmanNode
Diffstat (limited to 'zdeflate.cpp')
-rw-r--r-- | zdeflate.cpp | 8 |
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;};
|