diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2019-03-04 19:52:50 +0100 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2019-03-05 09:08:04 +0100 |
commit | 82c3b3f8e07f0572327275841333256fa3e679e3 (patch) | |
tree | feaf3071240ff352eb5944e966da4a7c96e62af2 /src/blockfilter.h | |
parent | 2d46f1be0c3c8b7287aa1f62bb1f5b4a8d00ff6e (diff) | |
download | bitcoin-82c3b3f8e07f0572327275841333256fa3e679e3.tar.xz |
Remove sharp edge (uninitialized m_filter_type) when using the compiler-generated constructor for BlockFilter
Diffstat (limited to 'src/blockfilter.h')
-rw-r--r-- | src/blockfilter.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/blockfilter.h b/src/blockfilter.h index 4d1f51dd60..e5e087ed5a 100644 --- a/src/blockfilter.h +++ b/src/blockfilter.h @@ -83,9 +83,10 @@ public: constexpr uint8_t BASIC_FILTER_P = 19; constexpr uint32_t BASIC_FILTER_M = 784931; -enum BlockFilterType : uint8_t +enum class BlockFilterType : uint8_t { BASIC = 0, + INVALID = 255, }; /** @@ -95,7 +96,7 @@ enum BlockFilterType : uint8_t class BlockFilter { private: - BlockFilterType m_filter_type; + BlockFilterType m_filter_type = BlockFilterType::INVALID; uint256 m_block_hash; GCSFilter m_filter; |