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:
MarcoFalke
2026-02-02 16:57:18 +01:00
parent fa06e26764
commit fad3eb3956

View File

@@ -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;
}