diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-12-26 12:40:37 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-01-03 18:37:59 +0100 |
commit | fa39cdd072c91eac70cda04b8b26681611f94cb7 (patch) | |
tree | d55df8a3ca432f25a970b5ef6f90bef37e29fa53 /src/outputtype.h | |
parent | 2dab2d239a4777b5ffd59a94a8eebd8638644e6c (diff) | |
download | bitcoin-fa39cdd072c91eac70cda04b8b26681611f94cb7.tar.xz |
refactor: Use C++17 std::array deduction for OUTPUT_TYPES
Diffstat (limited to 'src/outputtype.h')
-rw-r--r-- | src/outputtype.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/outputtype.h b/src/outputtype.h index 57316b92d6..88422e5824 100644 --- a/src/outputtype.h +++ b/src/outputtype.h @@ -20,7 +20,11 @@ enum class OutputType { BECH32, }; -extern const std::array<OutputType, 3> OUTPUT_TYPES; +static constexpr auto OUTPUT_TYPES = std::array{ + OutputType::LEGACY, + OutputType::P2SH_SEGWIT, + OutputType::BECH32, +}; [[nodiscard]] bool ParseOutputType(const std::string& str, OutputType& output_type); const std::string& FormatOutputType(OutputType type); |