mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Get rid of nType and nVersion
Remove the nType and nVersion as parameters to all serialization methods and functions. There is only one place where it's read and has an impact (in CAddress), and even there it does not impact any of the recursively invoked serializers. Instead, the few places that need nType or nVersion are changed to read it directly from the stream object, through GetType() and GetVersion() methods which are added to all stream classes.
This commit is contained in:
parent
657e05ab2e
commit
528472111b
36 changed files with 304 additions and 280 deletions
|
|
@ -42,10 +42,12 @@ public:
|
|||
template<typename T>
|
||||
TxInputStream& operator>>(T& obj)
|
||||
{
|
||||
::Unserialize(*this, obj, m_type, m_version);
|
||||
::Unserialize(*this, obj);
|
||||
return *this;
|
||||
}
|
||||
|
||||
int GetVersion() const { return m_version; }
|
||||
int GetType() const { return m_type; }
|
||||
private:
|
||||
const int m_type;
|
||||
const int m_version;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue