mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 03:47:29 -03:00
streams: Add SpanReader ignore method
Needed to deserialize some types from spans like CScripts
This commit is contained in:
parent
abfc8c901d
commit
82a379eca8
1 changed files with 5 additions and 0 deletions
|
@ -182,6 +182,11 @@ public:
|
||||||
memcpy(dst.data(), m_data.data(), dst.size());
|
memcpy(dst.data(), m_data.data(), dst.size());
|
||||||
m_data = m_data.subspan(dst.size());
|
m_data = m_data.subspan(dst.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ignore(size_t n)
|
||||||
|
{
|
||||||
|
m_data = m_data.subspan(n);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Double ended buffer combining vector and stream-like interfaces.
|
/** Double ended buffer combining vector and stream-like interfaces.
|
||||||
|
|
Loading…
Reference in a new issue