aboutsummaryrefslogtreecommitdiff
path: root/src/util/system.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2022-04-04 15:05:47 -0400
committerMacroFake <falke.marco@gmail.com>2022-04-27 14:13:39 +0200
commite7d2fbda63c346ae88767c3f8d4db3edeae2dc0b (patch)
tree4dd8119287a61d27f9b95b2a33a946ac8120d7e9 /src/util/system.cpp
parent8ffbd1412d887535ce5eb613884858c319bd12be (diff)
downloadbitcoin-e7d2fbda63c346ae88767c3f8d4db3edeae2dc0b.tar.xz
Use std::string_view throughout util strencodings/string
Diffstat (limited to 'src/util/system.cpp')
-rw-r--r--src/util/system.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/system.cpp b/src/util/system.cpp
index a7e66defcd..f9a9ad3e20 100644
--- a/src/util/system.cpp
+++ b/src/util/system.cpp
@@ -853,8 +853,8 @@ static bool GetConfigOptions(std::istream& stream, const std::string& filepath,
error = strprintf("parse error on line %i: %s, options in configuration file must be specified without leading -", linenr, str);
return false;
} else if ((pos = str.find('=')) != std::string::npos) {
- std::string name = prefix + TrimString(str.substr(0, pos), pattern);
- std::string value = TrimString(str.substr(pos + 1), pattern);
+ std::string name = prefix + TrimString(std::string_view{str}.substr(0, pos), pattern);
+ std::string_view value = TrimStringView(std::string_view{str}.substr(pos + 1), pattern);
if (used_hash && name.find("rpcpassword") != std::string::npos) {
error = strprintf("parse error on line %i, using # in rpcpassword can be ambiguous and should be avoided", linenr);
return false;