mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-07 22:28:02 +02: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:
@@ -16,6 +16,7 @@
|
||||
#include <cassert>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
@@ -91,7 +92,7 @@ std::string InvalidEstimateModeErrorMessage()
|
||||
return "Invalid estimate_mode parameter, must be one of: \"" + FeeModes("\", \"") + "\"";
|
||||
}
|
||||
|
||||
bool FeeModeFromString(const std::string& mode_string, FeeEstimateMode& fee_estimate_mode)
|
||||
bool FeeModeFromString(std::string_view mode_string, FeeEstimateMode& fee_estimate_mode)
|
||||
{
|
||||
auto searchkey = ToUpper(mode_string);
|
||||
for (const auto& pair : FeeModeMap()) {
|
||||
|
||||
Reference in New Issue
Block a user