mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
refactor: SpanReader without nVersion
The field is unused, so remove it. This is also required for future commits.
This commit is contained in:
@@ -100,16 +100,13 @@ private:
|
||||
class SpanReader
|
||||
{
|
||||
private:
|
||||
const int m_version;
|
||||
Span<const unsigned char> m_data;
|
||||
|
||||
public:
|
||||
/**
|
||||
* @param[in] version Serialization Version (including any flags)
|
||||
* @param[in] data Referenced byte vector to overwrite/append
|
||||
*/
|
||||
SpanReader(int version, Span<const unsigned char> data)
|
||||
: m_version{version}, m_data{data} {}
|
||||
explicit SpanReader(Span<const unsigned char> data) : m_data{data} {}
|
||||
|
||||
template<typename T>
|
||||
SpanReader& operator>>(T&& obj)
|
||||
@@ -118,8 +115,6 @@ public:
|
||||
return (*this);
|
||||
}
|
||||
|
||||
int GetVersion() const { return m_version; }
|
||||
|
||||
size_t size() const { return m_data.size(); }
|
||||
bool empty() const { return m_data.empty(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user