mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-05 03:18:50 +02:00
refactor: Make HexStr take a span
Make HexStr take a span of bytes, instead of an awkward pair of templated iterators.
This commit is contained in:
@@ -34,7 +34,7 @@ std::string static EncodeDumpString(const std::string &str) {
|
||||
std::stringstream ret;
|
||||
for (const unsigned char c : str) {
|
||||
if (c <= 32 || c >= 128 || c == '%') {
|
||||
ret << '%' << HexStr(&c, &c + 1);
|
||||
ret << '%' << HexStr(Span<const unsigned char>(&c, 1));
|
||||
} else {
|
||||
ret << c;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user