mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
refactor: VectorWriter without nVersion
The field is unused, so remove it. This is also required for future commits.
This commit is contained in:
@@ -12,14 +12,14 @@
|
||||
class CNetMsgMaker
|
||||
{
|
||||
public:
|
||||
explicit CNetMsgMaker(int nVersionIn) : nVersion(nVersionIn){}
|
||||
explicit CNetMsgMaker(int /*unused*/) {}
|
||||
|
||||
template <typename... Args>
|
||||
CSerializedNetMsg Make(int nFlags, std::string msg_type, Args&&... args) const
|
||||
CSerializedNetMsg Make(int /*unused*/, std::string msg_type, Args&&... args) const
|
||||
{
|
||||
CSerializedNetMsg msg;
|
||||
msg.m_type = std::move(msg_type);
|
||||
CVectorWriter{nFlags | nVersion, msg.data, 0, std::forward<Args>(args)...};
|
||||
VectorWriter{msg.data, 0, std::forward<Args>(args)...};
|
||||
return msg;
|
||||
}
|
||||
|
||||
@@ -28,9 +28,6 @@ public:
|
||||
{
|
||||
return Make(0, std::move(msg_type), std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
private:
|
||||
const int nVersion;
|
||||
};
|
||||
|
||||
#endif // BITCOIN_NETMESSAGEMAKER_H
|
||||
|
||||
Reference in New Issue
Block a user