From fad3eb39564569e7b09982bec68ae41e45a04f87 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Mon, 2 Feb 2026 16:57:18 +0100 Subject: [PATCH] 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. --- src/dbwrapper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dbwrapper.h b/src/dbwrapper.h index b2ce67c7c2e..2eee6c1c023 100644 --- a/src/dbwrapper.h +++ b/src/dbwrapper.h @@ -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; }