/Users/eugenesiegel/btc/bitcoin/src/univalue/include/univalue.h
Line | Count | Source (jump to first uncovered line) |
1 | | // Copyright 2014 BitPay Inc. |
2 | | // Copyright 2015 Bitcoin Core Developers |
3 | | // Distributed under the MIT software license, see the accompanying |
4 | | // file COPYING or https://opensource.org/licenses/mit-license.php. |
5 | | |
6 | | #ifndef BITCOIN_UNIVALUE_INCLUDE_UNIVALUE_H |
7 | | #define BITCOIN_UNIVALUE_INCLUDE_UNIVALUE_H |
8 | | |
9 | | #include <charconv> |
10 | | #include <cstddef> |
11 | | #include <cstdint> |
12 | | #include <map> |
13 | | #include <stdexcept> |
14 | | #include <string> |
15 | | #include <string_view> |
16 | | #include <system_error> |
17 | | #include <type_traits> |
18 | | #include <utility> |
19 | | #include <vector> |
20 | | |
21 | | // NOLINTNEXTLINE(misc-no-recursion) |
22 | | class UniValue { |
23 | | public: |
24 | | enum VType { VNULL, VOBJ, VARR, VSTR, VNUM, VBOOL, }; |
25 | | |
26 | | class type_error : public std::runtime_error |
27 | | { |
28 | | using std::runtime_error::runtime_error; |
29 | | }; |
30 | | |
31 | 15.8M | UniValue() { typ = VNULL; } |
32 | 99.9k | UniValue(UniValue::VType type, std::string str = {}) : typ{type}, val{std::move(str)} {} |
33 | | template <typename Ref, typename T = std::remove_cv_t<std::remove_reference_t<Ref>>, |
34 | | std::enable_if_t<std::is_floating_point_v<T> || // setFloat |
35 | | std::is_same_v<bool, T> || // setBool |
36 | | std::is_signed_v<T> || std::is_unsigned_v<T> || // setInt |
37 | | std::is_constructible_v<std::string, T>, // setStr |
38 | | bool> = true> |
39 | | UniValue(Ref&& val) |
40 | 799k | { |
41 | 799k | if constexpr (std::is_floating_point_v<T>) { |
42 | 2 | setFloat(val); |
43 | 199k | } else if constexpr (std::is_same_v<bool, T>) { |
44 | 199k | setBool(val); |
45 | 199k | } else if constexpr (std::is_signed_v<T>) { |
46 | 30 | setInt(int64_t{val}); |
47 | 30 | } else if constexpr (std::is_unsigned_v<T>) { |
48 | 4 | setInt(uint64_t{val}); |
49 | 599k | } else { |
50 | 599k | setStr(std::string{std::forward<Ref>(val)}); |
51 | 599k | } |
52 | 799k | } Unexecuted instantiation: _ZN8UniValueC2IRNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_TnNS1_9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS8_Esr3stdE11is_signed_vIS8_Esr3stdE13is_unsigned_vIS8_Esr3stdE18is_constructible_vINS1_12basic_stringIcS4_NS1_9allocatorIcEEEES8_EEbE4typeELb1EEEOT_ _ZN8UniValueC2IbbTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS3_Esr3stdE11is_signed_vIS3_Esr3stdE13is_unsigned_vIS3_Esr3stdE18is_constructible_vINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES3_EEbE4typeELb1EEEOT_ Line | Count | Source | 40 | 199k | { | 41 | | if constexpr (std::is_floating_point_v<T>) { | 42 | | setFloat(val); | 43 | 199k | } else if constexpr (std::is_same_v<bool, T>) { | 44 | 199k | setBool(val); | 45 | | } else if constexpr (std::is_signed_v<T>) { | 46 | | setInt(int64_t{val}); | 47 | | } else if constexpr (std::is_unsigned_v<T>) { | 48 | | setInt(uint64_t{val}); | 49 | | } else { | 50 | | setStr(std::string{std::forward<Ref>(val)}); | 51 | | } | 52 | 199k | } |
_ZN8UniValueC2IKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_TnNS1_9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbSA_Esr3stdE11is_signed_vISA_Esr3stdE13is_unsigned_vISA_Esr3stdE18is_constructible_vIS7_SA_EEbE4typeELb1EEEOT_ Line | Count | Source | 40 | 449k | { | 41 | | if constexpr (std::is_floating_point_v<T>) { | 42 | | setFloat(val); | 43 | | } else if constexpr (std::is_same_v<bool, T>) { | 44 | | setBool(val); | 45 | | } else if constexpr (std::is_signed_v<T>) { | 46 | | setInt(int64_t{val}); | 47 | | } else if constexpr (std::is_unsigned_v<T>) { | 48 | | setInt(uint64_t{val}); | 49 | 449k | } else { | 50 | 449k | setStr(std::string{std::forward<Ref>(val)}); | 51 | 449k | } | 52 | 449k | } |
_ZN8UniValueC2IRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_TnNS1_9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbSB_Esr3stdE11is_signed_vISB_Esr3stdE13is_unsigned_vISB_Esr3stdE18is_constructible_vIS7_SB_EEbE4typeELb1EEEOT_ Line | Count | Source | 40 | 99.9k | { | 41 | | if constexpr (std::is_floating_point_v<T>) { | 42 | | setFloat(val); | 43 | | } else if constexpr (std::is_same_v<bool, T>) { | 44 | | setBool(val); | 45 | | } else if constexpr (std::is_signed_v<T>) { | 46 | | setInt(int64_t{val}); | 47 | | } else if constexpr (std::is_unsigned_v<T>) { | 48 | | setInt(uint64_t{val}); | 49 | 99.9k | } else { | 50 | 99.9k | setStr(std::string{std::forward<Ref>(val)}); | 51 | 99.9k | } | 52 | 99.9k | } |
_ZN8UniValueC2INSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_TnNS1_9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS9_Esr3stdE11is_signed_vIS9_Esr3stdE13is_unsigned_vIS9_Esr3stdE18is_constructible_vIS7_S9_EEbE4typeELb1EEEOT_ Line | Count | Source | 40 | 49.9k | { | 41 | | if constexpr (std::is_floating_point_v<T>) { | 42 | | setFloat(val); | 43 | | } else if constexpr (std::is_same_v<bool, T>) { | 44 | | setBool(val); | 45 | | } else if constexpr (std::is_signed_v<T>) { | 46 | | setInt(int64_t{val}); | 47 | | } else if constexpr (std::is_unsigned_v<T>) { | 48 | | setInt(uint64_t{val}); | 49 | 49.9k | } else { | 50 | 49.9k | setStr(std::string{std::forward<Ref>(val)}); | 51 | 49.9k | } | 52 | 49.9k | } |
Unexecuted instantiation: _ZN8UniValueC2IRKjjTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS5_Esr3stdE11is_signed_vIS5_Esr3stdE13is_unsigned_vIS5_Esr3stdE18is_constructible_vINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEES5_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IjjTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS3_Esr3stdE11is_signed_vIS3_Esr3stdE13is_unsigned_vIS3_Esr3stdE18is_constructible_vINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES3_EEbE4typeELb1EEEOT_ _ZN8UniValueC2IiiTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS3_Esr3stdE11is_signed_vIS3_Esr3stdE13is_unsigned_vIS3_Esr3stdE18is_constructible_vINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES3_EEbE4typeELb1EEEOT_ Line | Count | Source | 40 | 30 | { | 41 | | if constexpr (std::is_floating_point_v<T>) { | 42 | | setFloat(val); | 43 | | } else if constexpr (std::is_same_v<bool, T>) { | 44 | | setBool(val); | 45 | 30 | } else if constexpr (std::is_signed_v<T>) { | 46 | 30 | setInt(int64_t{val}); | 47 | | } else if constexpr (std::is_unsigned_v<T>) { | 48 | | setInt(uint64_t{val}); | 49 | | } else { | 50 | | setStr(std::string{std::forward<Ref>(val)}); | 51 | | } | 52 | 30 | } |
Unexecuted instantiation: _ZN8UniValueC2IxxTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS3_Esr3stdE11is_signed_vIS3_Esr3stdE13is_unsigned_vIS3_Esr3stdE18is_constructible_vINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES3_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IyyTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS3_Esr3stdE11is_signed_vIS3_Esr3stdE13is_unsigned_vIS3_Esr3stdE18is_constructible_vINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES3_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRKiiTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS5_Esr3stdE11is_signed_vIS5_Esr3stdE13is_unsigned_vIS5_Esr3stdE18is_constructible_vINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEES5_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRKxxTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS5_Esr3stdE11is_signed_vIS5_Esr3stdE13is_unsigned_vIS5_Esr3stdE18is_constructible_vINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEES5_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRbbTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS4_Esr3stdE11is_signed_vIS4_Esr3stdE13is_unsigned_vIS4_Esr3stdE18is_constructible_vINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES4_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRA4_KcA4_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRiiTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS4_Esr3stdE11is_signed_vIS4_Esr3stdE13is_unsigned_vIS4_Esr3stdE18is_constructible_vINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES4_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRA33_KcA33_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRA47_KcA47_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ _ZN8UniValueC2IRA1_KcA1_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Line | Count | Source | 40 | 2 | { | 41 | | if constexpr (std::is_floating_point_v<T>) { | 42 | | setFloat(val); | 43 | | } else if constexpr (std::is_same_v<bool, T>) { | 44 | | setBool(val); | 45 | | } else if constexpr (std::is_signed_v<T>) { | 46 | | setInt(int64_t{val}); | 47 | | } else if constexpr (std::is_unsigned_v<T>) { | 48 | | setInt(uint64_t{val}); | 49 | 2 | } else { | 50 | 2 | setStr(std::string{std::forward<Ref>(val)}); | 51 | 2 | } | 52 | 2 | } |
Unexecuted instantiation: _ZN8UniValueC2IRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_TnNS1_9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbSA_Esr3stdE11is_signed_vISA_Esr3stdE13is_unsigned_vISA_Esr3stdE18is_constructible_vIS7_SA_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRhhTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS4_Esr3stdE11is_signed_vIS4_Esr3stdE13is_unsigned_vIS4_Esr3stdE18is_constructible_vINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES4_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRxxTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS4_Esr3stdE11is_signed_vIS4_Esr3stdE13is_unsigned_vIS4_Esr3stdE18is_constructible_vINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES4_EEbE4typeELb1EEEOT_ _ZN8UniValueC2IRA11_KcA11_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Line | Count | Source | 40 | 2 | { | 41 | | if constexpr (std::is_floating_point_v<T>) { | 42 | | setFloat(val); | 43 | | } else if constexpr (std::is_same_v<bool, T>) { | 44 | | setBool(val); | 45 | | } else if constexpr (std::is_signed_v<T>) { | 46 | | setInt(int64_t{val}); | 47 | | } else if constexpr (std::is_unsigned_v<T>) { | 48 | | setInt(uint64_t{val}); | 49 | 2 | } else { | 50 | 2 | setStr(std::string{std::forward<Ref>(val)}); | 51 | 2 | } | 52 | 2 | } |
Unexecuted instantiation: _ZN8UniValueC2IRA30_KcA30_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRA45_KcA45_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRA86_KcA86_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRA54_KcA54_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ _ZN8UniValueC2IRKyyTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS5_Esr3stdE11is_signed_vIS5_Esr3stdE13is_unsigned_vIS5_Esr3stdE18is_constructible_vINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEES5_EEbE4typeELb1EEEOT_ Line | Count | Source | 40 | 4 | { | 41 | | if constexpr (std::is_floating_point_v<T>) { | 42 | | setFloat(val); | 43 | | } else if constexpr (std::is_same_v<bool, T>) { | 44 | | setBool(val); | 45 | | } else if constexpr (std::is_signed_v<T>) { | 46 | | setInt(int64_t{val}); | 47 | 4 | } else if constexpr (std::is_unsigned_v<T>) { | 48 | 4 | setInt(uint64_t{val}); | 49 | | } else { | 50 | | setStr(std::string{std::forward<Ref>(val)}); | 51 | | } | 52 | 4 | } |
Unexecuted instantiation: _ZN8UniValueC2IRKbbTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS5_Esr3stdE11is_signed_vIS5_Esr3stdE13is_unsigned_vIS5_Esr3stdE18is_constructible_vINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEES5_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRA137_KcA137_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ _ZN8UniValueC2IRA6_KcA6_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Line | Count | Source | 40 | 2 | { | 41 | | if constexpr (std::is_floating_point_v<T>) { | 42 | | setFloat(val); | 43 | | } else if constexpr (std::is_same_v<bool, T>) { | 44 | | setBool(val); | 45 | | } else if constexpr (std::is_signed_v<T>) { | 46 | | setInt(int64_t{val}); | 47 | | } else if constexpr (std::is_unsigned_v<T>) { | 48 | | setInt(uint64_t{val}); | 49 | 2 | } else { | 50 | 2 | setStr(std::string{std::forward<Ref>(val)}); | 51 | 2 | } | 52 | 2 | } |
Unexecuted instantiation: _ZN8UniValueC2IRA3_KcA3_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ _ZN8UniValueC2IRA35_KcA35_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Line | Count | Source | 40 | 4 | { | 41 | | if constexpr (std::is_floating_point_v<T>) { | 42 | | setFloat(val); | 43 | | } else if constexpr (std::is_same_v<bool, T>) { | 44 | | setBool(val); | 45 | | } else if constexpr (std::is_signed_v<T>) { | 46 | | setInt(int64_t{val}); | 47 | | } else if constexpr (std::is_unsigned_v<T>) { | 48 | | setInt(uint64_t{val}); | 49 | 4 | } else { | 50 | 4 | setStr(std::string{std::forward<Ref>(val)}); | 51 | 4 | } | 52 | 4 | } |
Unexecuted instantiation: _ZN8UniValueC2IRA5_KcA5_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ _ZN8UniValueC2IRA7_KcA7_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Line | Count | Source | 40 | 2 | { | 41 | | if constexpr (std::is_floating_point_v<T>) { | 42 | | setFloat(val); | 43 | | } else if constexpr (std::is_same_v<bool, T>) { | 44 | | setBool(val); | 45 | | } else if constexpr (std::is_signed_v<T>) { | 46 | | setInt(int64_t{val}); | 47 | | } else if constexpr (std::is_unsigned_v<T>) { | 48 | | setInt(uint64_t{val}); | 49 | 2 | } else { | 50 | 2 | setStr(std::string{std::forward<Ref>(val)}); | 51 | 2 | } | 52 | 2 | } |
Unexecuted instantiation: _ZN8UniValueC2IRA9_KcA9_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRA8_KcA8_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRA12_KcA12_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ _ZN8UniValueC2IddTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS3_Esr3stdE11is_signed_vIS3_Esr3stdE13is_unsigned_vIS3_Esr3stdE18is_constructible_vINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES3_EEbE4typeELb1EEEOT_ Line | Count | Source | 40 | 2 | { | 41 | 2 | if constexpr (std::is_floating_point_v<T>) { | 42 | 2 | setFloat(val); | 43 | | } else if constexpr (std::is_same_v<bool, T>) { | 44 | | setBool(val); | 45 | | } else if constexpr (std::is_signed_v<T>) { | 46 | | setInt(int64_t{val}); | 47 | | } else if constexpr (std::is_unsigned_v<T>) { | 48 | | setInt(uint64_t{val}); | 49 | | } else { | 50 | | setStr(std::string{std::forward<Ref>(val)}); | 51 | | } | 52 | 2 | } |
_ZN8UniValueC2IRA18_KcA18_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Line | Count | Source | 40 | 2 | { | 41 | | if constexpr (std::is_floating_point_v<T>) { | 42 | | setFloat(val); | 43 | | } else if constexpr (std::is_same_v<bool, T>) { | 44 | | setBool(val); | 45 | | } else if constexpr (std::is_signed_v<T>) { | 46 | | setInt(int64_t{val}); | 47 | | } else if constexpr (std::is_unsigned_v<T>) { | 48 | | setInt(uint64_t{val}); | 49 | 2 | } else { | 50 | 2 | setStr(std::string{std::forward<Ref>(val)}); | 51 | 2 | } | 52 | 2 | } |
Unexecuted instantiation: _ZN8UniValueC2IRyyTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS4_Esr3stdE11is_signed_vIS4_Esr3stdE13is_unsigned_vIS4_Esr3stdE18is_constructible_vINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES4_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRKmmTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS5_Esr3stdE11is_signed_vIS5_Esr3stdE13is_unsigned_vIS5_Esr3stdE18is_constructible_vINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEES5_EEbE4typeELb1EEEOT_ _ZN8UniValueC2IRA26_KcA26_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Line | Count | Source | 40 | 2 | { | 41 | | if constexpr (std::is_floating_point_v<T>) { | 42 | | setFloat(val); | 43 | | } else if constexpr (std::is_same_v<bool, T>) { | 44 | | setBool(val); | 45 | | } else if constexpr (std::is_signed_v<T>) { | 46 | | setInt(int64_t{val}); | 47 | | } else if constexpr (std::is_unsigned_v<T>) { | 48 | | setInt(uint64_t{val}); | 49 | 2 | } else { | 50 | 2 | setStr(std::string{std::forward<Ref>(val)}); | 51 | 2 | } | 52 | 2 | } |
Unexecuted instantiation: _ZN8UniValueC2IRjjTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS4_Esr3stdE11is_signed_vIS4_Esr3stdE13is_unsigned_vIS4_Esr3stdE18is_constructible_vINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES4_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRmmTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS4_Esr3stdE11is_signed_vIS4_Esr3stdE13is_unsigned_vIS4_Esr3stdE18is_constructible_vINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES4_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRA38_KcA38_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRddTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS4_Esr3stdE11is_signed_vIS4_Esr3stdE13is_unsigned_vIS4_Esr3stdE18is_constructible_vINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES4_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRA60_KcA60_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRA17_KcA17_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRA15_KcA15_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRA10_KcA10_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRA23_KcA23_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRA13_KcA13_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2ImmTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS3_Esr3stdE11is_signed_vIS3_Esr3stdE13is_unsigned_vIS3_Esr3stdE18is_constructible_vINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES3_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IPKcS2_TnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS5_Esr3stdE11is_signed_vIS5_Esr3stdE13is_unsigned_vIS5_Esr3stdE18is_constructible_vINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEES5_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRKttTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS5_Esr3stdE11is_signed_vIS5_Esr3stdE13is_unsigned_vIS5_Esr3stdE18is_constructible_vINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEES5_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRA21_KcA21_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IttTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS3_Esr3stdE11is_signed_vIS3_Esr3stdE13is_unsigned_vIS3_Esr3stdE18is_constructible_vINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES3_EEbE4typeELb1EEEOT_ Unexecuted instantiation: _ZN8UniValueC2IRA91_KcA91_cTnNSt3__19enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEES7_EEbE4typeELb1EEEOT_ |
53 | | |
54 | | void clear(); |
55 | | |
56 | | void setNull(); |
57 | | void setBool(bool val); |
58 | | void setNumStr(std::string str); |
59 | | void setInt(uint64_t val); |
60 | | void setInt(int64_t val); |
61 | 0 | void setInt(int val_) { return setInt(int64_t{val_}); } |
62 | | void setFloat(double val); |
63 | | void setStr(std::string str); |
64 | | void setArray(); |
65 | | void setObject(); |
66 | | |
67 | 96 | enum VType getType() const { return typ; } |
68 | 599k | const std::string& getValStr() const { return val; } |
69 | 0 | bool empty() const { return (values.size() == 0); } |
70 | | |
71 | 0 | size_t size() const { return values.size(); } |
72 | | |
73 | | void getObjMap(std::map<std::string,UniValue>& kv) const; |
74 | | bool checkObject(const std::map<std::string,UniValue::VType>& memberTypes) const; |
75 | | const UniValue& operator[](const std::string& key) const; |
76 | | const UniValue& operator[](size_t index) const; |
77 | 0 | bool exists(const std::string& key) const { size_t i; return findKey(key, i); } |
78 | | |
79 | 15.5M | bool isNull() const { return (typ == VNULL); } |
80 | 349k | bool isTrue() const { return (typ == VBOOL) && (val == "1")0 ; } |
81 | 2.79M | bool isFalse() const { return (typ == VBOOL) && (val != "1")549k ; } |
82 | 249k | bool isBool() const { return (typ == VBOOL); } |
83 | 0 | bool isStr() const { return (typ == VSTR); } |
84 | 199k | bool isNum() const { return (typ == VNUM); } |
85 | 149k | bool isArray() const { return (typ == VARR); } |
86 | 0 | bool isObject() const { return (typ == VOBJ); } |
87 | | |
88 | | void push_back(UniValue val); |
89 | | void push_backV(const std::vector<UniValue>& vec); |
90 | | template <class It> |
91 | | void push_backV(It first, It last); |
92 | | |
93 | | void pushKVEnd(std::string key, UniValue val); |
94 | | void pushKV(std::string key, UniValue val); |
95 | | void pushKVs(UniValue obj); |
96 | | |
97 | | std::string write(unsigned int prettyIndent = 0, |
98 | | unsigned int indentLevel = 0) const; |
99 | | |
100 | | bool read(std::string_view raw); |
101 | | |
102 | | private: |
103 | | UniValue::VType typ; |
104 | | std::string val; // numbers are stored as C++ strings |
105 | | std::vector<std::string> keys; |
106 | | std::vector<UniValue> values; |
107 | | |
108 | | void checkType(const VType& expected) const; |
109 | | bool findKey(const std::string& key, size_t& retIdx) const; |
110 | | void writeArray(unsigned int prettyIndent, unsigned int indentLevel, std::string& s) const; |
111 | | void writeObject(unsigned int prettyIndent, unsigned int indentLevel, std::string& s) const; |
112 | | |
113 | | public: |
114 | | // Strict type-specific getters, these throw std::runtime_error if the |
115 | | // value is of unexpected type |
116 | | const std::vector<std::string>& getKeys() const; |
117 | | const std::vector<UniValue>& getValues() const; |
118 | | template <typename Int> |
119 | | Int getInt() const; |
120 | | bool get_bool() const; |
121 | | const std::string& get_str() const; |
122 | | double get_real() const; |
123 | | const UniValue& get_obj() const; |
124 | | const UniValue& get_array() const; |
125 | | |
126 | 0 | enum VType type() const { return getType(); } |
127 | | const UniValue& find_value(std::string_view key) const; |
128 | | }; |
129 | | |
130 | | template <class It> |
131 | | void UniValue::push_backV(It first, It last) |
132 | 0 | { |
133 | 0 | checkType(VARR); |
134 | 0 | values.insert(values.end(), first, last); |
135 | 0 | } |
136 | | |
137 | | template <typename Int> |
138 | | Int UniValue::getInt() const |
139 | 0 | { |
140 | 0 | static_assert(std::is_integral_v<Int>); |
141 | 0 | checkType(VNUM); |
142 | 0 | Int result; |
143 | 0 | const auto [first_nonmatching, error_condition] = std::from_chars(val.data(), val.data() + val.size(), result); |
144 | 0 | if (first_nonmatching != val.data() + val.size() || error_condition != std::errc{}) { |
145 | 0 | throw std::runtime_error("JSON integer out of range"); |
146 | 0 | } |
147 | 0 | return result; |
148 | 0 | } Unexecuted instantiation: _ZNK8UniValue6getIntIxEET_v Unexecuted instantiation: _ZNK8UniValue6getIntIiEET_v Unexecuted instantiation: _ZNK8UniValue6getIntIyEET_v Unexecuted instantiation: _ZNK8UniValue6getIntIjEET_v Unexecuted instantiation: _ZNK8UniValue6getIntItEET_v |
149 | | |
150 | | enum jtokentype { |
151 | | JTOK_ERR = -1, |
152 | | JTOK_NONE = 0, // eof |
153 | | JTOK_OBJ_OPEN, |
154 | | JTOK_OBJ_CLOSE, |
155 | | JTOK_ARR_OPEN, |
156 | | JTOK_ARR_CLOSE, |
157 | | JTOK_COLON, |
158 | | JTOK_COMMA, |
159 | | JTOK_KW_NULL, |
160 | | JTOK_KW_TRUE, |
161 | | JTOK_KW_FALSE, |
162 | | JTOK_NUMBER, |
163 | | JTOK_STRING, |
164 | | }; |
165 | | |
166 | | extern enum jtokentype getJsonToken(std::string& tokenVal, |
167 | | unsigned int& consumed, const char *raw, const char *end); |
168 | | extern const char *uvTypeName(UniValue::VType t); |
169 | | |
170 | | static inline bool jsonTokenIsValue(enum jtokentype jtt) |
171 | 0 | { |
172 | 0 | switch (jtt) { |
173 | 0 | case JTOK_KW_NULL: |
174 | 0 | case JTOK_KW_TRUE: |
175 | 0 | case JTOK_KW_FALSE: |
176 | 0 | case JTOK_NUMBER: |
177 | 0 | case JTOK_STRING: |
178 | 0 | return true; |
179 | | |
180 | 0 | default: |
181 | 0 | return false; |
182 | 0 | } |
183 | | |
184 | | // not reached |
185 | 0 | } Unexecuted instantiation: hex.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: integer.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: key.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: kitchen_sink.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: parse_univalue.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: rpc.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: script.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: script_assets_test_minimizer.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: script_format.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: string.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: transaction.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: client.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: args.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: config.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: run_command.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: settings.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: core_write.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: external_signer.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: net_types.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: rawtransaction_util.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: request.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: util.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: univalue.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: univalue_get.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: univalue_read.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: univalue_write.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: external_signer_scriptpubkeyman.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: interfaces.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: load.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: addresses.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: backup.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: coins.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: encrypt.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: signmessage.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: spend.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: transactions.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: wallet.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: setup_common.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: addrdb.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: httprpc.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: init.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: warnings.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: rest.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: blockchain.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: fees.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: mempool.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: mining.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: net.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: node.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: output_script.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: rawtransaction.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: server.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: server_util.cpp:_ZL16jsonTokenIsValue10jtokentype Unexecuted instantiation: txoutproof.cpp:_ZL16jsonTokenIsValue10jtokentype |
186 | | |
187 | | static inline bool json_isspace(int ch) |
188 | 36 | { |
189 | 36 | switch (ch) { |
190 | 0 | case 0x20: |
191 | 0 | case 0x09: |
192 | 0 | case 0x0a: |
193 | 0 | case 0x0d: |
194 | 0 | return true; |
195 | | |
196 | 36 | default: |
197 | 36 | return false; |
198 | 36 | } |
199 | | |
200 | | // not reached |
201 | 36 | } Unexecuted instantiation: hex.cpp:_ZL12json_isspacei Unexecuted instantiation: integer.cpp:_ZL12json_isspacei Unexecuted instantiation: key.cpp:_ZL12json_isspacei Unexecuted instantiation: kitchen_sink.cpp:_ZL12json_isspacei Unexecuted instantiation: parse_univalue.cpp:_ZL12json_isspacei Unexecuted instantiation: rpc.cpp:_ZL12json_isspacei Unexecuted instantiation: script.cpp:_ZL12json_isspacei Unexecuted instantiation: script_assets_test_minimizer.cpp:_ZL12json_isspacei Unexecuted instantiation: script_format.cpp:_ZL12json_isspacei Unexecuted instantiation: string.cpp:_ZL12json_isspacei Unexecuted instantiation: transaction.cpp:_ZL12json_isspacei Unexecuted instantiation: client.cpp:_ZL12json_isspacei Unexecuted instantiation: args.cpp:_ZL12json_isspacei Unexecuted instantiation: config.cpp:_ZL12json_isspacei Unexecuted instantiation: run_command.cpp:_ZL12json_isspacei Unexecuted instantiation: settings.cpp:_ZL12json_isspacei Unexecuted instantiation: core_write.cpp:_ZL12json_isspacei Unexecuted instantiation: external_signer.cpp:_ZL12json_isspacei Unexecuted instantiation: net_types.cpp:_ZL12json_isspacei Unexecuted instantiation: rawtransaction_util.cpp:_ZL12json_isspacei Unexecuted instantiation: request.cpp:_ZL12json_isspacei Unexecuted instantiation: util.cpp:_ZL12json_isspacei Unexecuted instantiation: univalue.cpp:_ZL12json_isspacei Unexecuted instantiation: univalue_get.cpp:_ZL12json_isspacei univalue_read.cpp:_ZL12json_isspacei Line | Count | Source | 188 | 36 | { | 189 | 36 | switch (ch) { | 190 | 0 | case 0x20: | 191 | 0 | case 0x09: | 192 | 0 | case 0x0a: | 193 | 0 | case 0x0d: | 194 | 0 | return true; | 195 | | | 196 | 36 | default: | 197 | 36 | return false; | 198 | 36 | } | 199 | | | 200 | | // not reached | 201 | 36 | } |
Unexecuted instantiation: univalue_write.cpp:_ZL12json_isspacei Unexecuted instantiation: external_signer_scriptpubkeyman.cpp:_ZL12json_isspacei Unexecuted instantiation: interfaces.cpp:_ZL12json_isspacei Unexecuted instantiation: load.cpp:_ZL12json_isspacei Unexecuted instantiation: addresses.cpp:_ZL12json_isspacei Unexecuted instantiation: backup.cpp:_ZL12json_isspacei Unexecuted instantiation: coins.cpp:_ZL12json_isspacei Unexecuted instantiation: encrypt.cpp:_ZL12json_isspacei Unexecuted instantiation: signmessage.cpp:_ZL12json_isspacei Unexecuted instantiation: spend.cpp:_ZL12json_isspacei Unexecuted instantiation: transactions.cpp:_ZL12json_isspacei Unexecuted instantiation: wallet.cpp:_ZL12json_isspacei Unexecuted instantiation: setup_common.cpp:_ZL12json_isspacei Unexecuted instantiation: addrdb.cpp:_ZL12json_isspacei Unexecuted instantiation: httprpc.cpp:_ZL12json_isspacei Unexecuted instantiation: init.cpp:_ZL12json_isspacei Unexecuted instantiation: warnings.cpp:_ZL12json_isspacei Unexecuted instantiation: rest.cpp:_ZL12json_isspacei Unexecuted instantiation: blockchain.cpp:_ZL12json_isspacei Unexecuted instantiation: fees.cpp:_ZL12json_isspacei Unexecuted instantiation: mempool.cpp:_ZL12json_isspacei Unexecuted instantiation: mining.cpp:_ZL12json_isspacei Unexecuted instantiation: net.cpp:_ZL12json_isspacei Unexecuted instantiation: node.cpp:_ZL12json_isspacei Unexecuted instantiation: output_script.cpp:_ZL12json_isspacei Unexecuted instantiation: rawtransaction.cpp:_ZL12json_isspacei Unexecuted instantiation: server.cpp:_ZL12json_isspacei Unexecuted instantiation: server_util.cpp:_ZL12json_isspacei Unexecuted instantiation: txoutproof.cpp:_ZL12json_isspacei |
202 | | |
203 | | extern const UniValue NullUniValue; |
204 | | |
205 | | #endif // BITCOIN_UNIVALUE_INCLUDE_UNIVALUE_H |