diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2023-01-31 11:50:10 +0000 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2023-01-31 11:50:10 +0000 |
commit | 96ee992ac3535848e2dc717bf284339badd40dcb (patch) | |
tree | e7405ed701334a1fcb99c72b5f0301725918f531 /src/univalue | |
parent | 357d750cab5221695d718e6d3e8ce63fa2b5ab3a (diff) | |
download | bitcoin-96ee992ac3535848e2dc717bf284339badd40dcb.tar.xz |
clang-tidy: Fix `modernize-use-default-member-init` in headers
See https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-default-member-init.html
Diffstat (limited to 'src/univalue')
-rw-r--r-- | src/univalue/include/univalue_utffilter.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/univalue/include/univalue_utffilter.h b/src/univalue/include/univalue_utffilter.h index f688eaaa30..41d8e6bb05 100644 --- a/src/univalue/include/univalue_utffilter.h +++ b/src/univalue/include/univalue_utffilter.h @@ -13,8 +13,8 @@ class JSONUTF8StringFilter { public: - explicit JSONUTF8StringFilter(std::string &s): - str(s), is_valid(true), codepoint(0), state(0), surpair(0) + explicit JSONUTF8StringFilter(std::string& s) + : str(s) { } // Write single 8-bit char (may be part of UTF-8 sequence) @@ -79,10 +79,10 @@ public: } private: std::string &str; - bool is_valid; + bool is_valid{true}; // Current UTF-8 decoding state - unsigned int codepoint; - int state; // Top bit to be filled in for next UTF-8 byte, or 0 + unsigned int codepoint{0}; + int state{0}; // Top bit to be filled in for next UTF-8 byte, or 0 // Keep track of the following state to handle the following section of // RFC4627: @@ -94,7 +94,7 @@ private: // "\uD834\uDD1E". // // Two subsequent \u.... may have to be replaced with one actual codepoint. - unsigned int surpair; // First half of open UTF-16 surrogate pair, or 0 + unsigned int surpair{0}; // First half of open UTF-16 surrogate pair, or 0 void append_codepoint(unsigned int codepoint_) { |