mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
Remove unused CDataStream
This commit is contained in:
@@ -279,42 +279,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class CDataStream : public DataStream
|
||||
{
|
||||
private:
|
||||
int nType;
|
||||
int nVersion;
|
||||
|
||||
public:
|
||||
explicit CDataStream(int nTypeIn, int nVersionIn)
|
||||
: nType{nTypeIn},
|
||||
nVersion{nVersionIn} {}
|
||||
|
||||
explicit CDataStream(Span<const uint8_t> sp, int type, int version) : CDataStream{AsBytes(sp), type, version} {}
|
||||
explicit CDataStream(Span<const value_type> sp, int nTypeIn, int nVersionIn)
|
||||
: DataStream{sp},
|
||||
nType{nTypeIn},
|
||||
nVersion{nVersionIn} {}
|
||||
|
||||
int GetType() const { return nType; }
|
||||
void SetVersion(int n) { nVersion = n; }
|
||||
int GetVersion() const { return nVersion; }
|
||||
|
||||
template <typename T>
|
||||
CDataStream& operator<<(const T& obj)
|
||||
{
|
||||
::Serialize(*this, obj);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
CDataStream& operator>>(T&& obj)
|
||||
{
|
||||
::Unserialize(*this, obj);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename IStream>
|
||||
class BitStreamReader
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user