diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-06-22 17:02:28 +0200 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-06-27 10:13:37 +0200 |
commit | fa38d862358b87219b12bf31236c52f28d9fc5d6 (patch) | |
tree | 5c5c6b18bc1df274a75332b4b60ea6f076097cf1 /src/pubkey.h | |
parent | fa257bc8312b91c2d281f48ca2500d9cba353cc5 (diff) |
Use only Span{} constructor for byte-like types where possible
This removes bloat that is not needed.
Diffstat (limited to 'src/pubkey.h')
-rw-r--r-- | src/pubkey.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pubkey.h b/src/pubkey.h index d8d5e3d85b..7d37504b01 100644 --- a/src/pubkey.h +++ b/src/pubkey.h @@ -142,14 +142,14 @@ public: { unsigned int len = size(); ::WriteCompactSize(s, len); - s.write(AsBytes(Span{vch, len})); + s << Span{vch, len}; } template <typename Stream> void Unserialize(Stream& s) { const unsigned int len(::ReadCompactSize(s)); if (len <= SIZE) { - s.read(AsWritableBytes(Span{vch, len})); + s >> Span{vch, len}; if (len != size()) { Invalidate(); } |