refactor: s/command/msg_type/ in CNetMsgMaker and CSerializedNetMsg
This commit is contained in:
1 parent
88d8b4e182
commit
51e9393c1f
4 files changed
+10
-10
No files matched your search
@@ -15,18 +15,18 @@ public:
|
||||
explicit CNetMsgMaker(int nVersionIn) : nVersion(nVersionIn){}
|
||||
|
||||
template <typename... Args>
|
||||
CSerializedNetMsg Make(int nFlags, std::string sCommand, Args&&... args) const
|
||||
CSerializedNetMsg Make(int nFlags, std::string msg_type, Args&&... args) const
|
||||
{
|
||||
CSerializedNetMsg msg;
|
||||
msg.command = std::move(sCommand);
|
||||
msg.m_type = std::move(msg_type);
|
||||
CVectorWriter{ SER_NETWORK, nFlags | nVersion, msg.data, 0, std::forward<Args>(args)... };
|
||||
return msg;
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
CSerializedNetMsg Make(std::string sCommand, Args&&... args) const
|
||||
CSerializedNetMsg Make(std::string msg_type, Args&&... args) const
|
||||
{
|
||||
return Make(0, std::move(sCommand), std::forward<Args>(args)...);
|
||||
return Make(0, std::move(msg_type), std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in new issue
Block a user