mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
refactor: increase string_view usage
Update select functions that take a const std::string& to take a
std::string_view instead. In a next commit, this allows us to use
the {Arg,MaybeArg}<std::string_view> helper.
This commit is contained in:
@@ -20,7 +20,7 @@ static const std::string OUTPUT_TYPE_STRING_BECH32 = "bech32";
|
||||
static const std::string OUTPUT_TYPE_STRING_BECH32M = "bech32m";
|
||||
static const std::string OUTPUT_TYPE_STRING_UNKNOWN = "unknown";
|
||||
|
||||
std::optional<OutputType> ParseOutputType(const std::string& type)
|
||||
std::optional<OutputType> ParseOutputType(std::string_view type)
|
||||
{
|
||||
if (type == OUTPUT_TYPE_STRING_LEGACY) {
|
||||
return OutputType::LEGACY;
|
||||
|
||||
Reference in New Issue
Block a user