mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-02 09:46:14 +00:00
refactor: Use SpanReader over DataStream
The mutable temporary strValue can be re-used to apply the obfuscation, which allows to avoid a redundant copy of the value.
This commit is contained in:
parent
fa06e26764
commit
fad3eb3956
@ -214,9 +214,9 @@ public:
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
DataStream ssValue{MakeByteSpan(*strValue)};
|
||||
std::span ssValue{MakeWritableByteSpan(*strValue)};
|
||||
m_obfuscation(ssValue);
|
||||
ssValue >> value;
|
||||
SpanReader{ssValue} >> value;
|
||||
} catch (const std::exception&) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user