Skip to content

Commit

Permalink
Change plNetMsgHandler message parameters to not be references
Browse files Browse the repository at this point in the history
  • Loading branch information
dgelessus committed Aug 13, 2023
1 parent 2103623 commit bda752f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void plNetClientMsgHandler::IFillInTransportMember(const plNetMsgMemberInfoHelpe
mbr->SetAvatarKey(avKey);
}

plNetMsgHandler::Status plNetClientMsgHandler::ReceiveMsg(plNetMessage *& netMsg)
plNetMsgHandler::Status plNetClientMsgHandler::ReceiveMsg(plNetMessage* netMsg)
{
#ifdef HS_DEBUGGING
//plNetClientMgr::GetInstance()->DebugMsg("<RCV> {}", netMsg->ClassName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class plNetClientMsgHandler : public plNetMsgHandler
plNetClientMsgHandler(plNetClientMgr * mgr);
~plNetClientMsgHandler();

plNetMsgHandler::Status ReceiveMsg(plNetMessage *& netMsg) override;
plNetMsgHandler::Status ReceiveMsg(plNetMessage* netMsg) override;

MSG_HANDLER_DECL(plNetMsgTerminated)
MSG_HANDLER_DECL(plNetMsgGroupOwner)
Expand Down
6 changes: 3 additions & 3 deletions Sources/Plasma/PubUtilLib/plNetCommon/plNetMsgHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class plNetMsgHandler
void SetNetApp(plNetApp* na) { fNetApp=na; }
plNetApp* GetNetApp() { return fNetApp; }

virtual Status ReceiveMsg(plNetMessage*& netMsg) = 0;
virtual Status ReceiveMsg(plNetMessage* netMsg) = 0;
};

#define MSG_HANDLER(msgClassName) msgClassName##HandleMsg
Expand All @@ -77,13 +77,13 @@ class plNetMsgHandler
// Use to declare msg handler fxns in your MsgHandler .h class header
//
#define MSG_HANDLER_DECL(msgClassName) \
virtual plNetMsgHandler::Status MSG_HANDLER(msgClassName)(plNetMessage*& netMsg);
virtual plNetMsgHandler::Status MSG_HANDLER(msgClassName)(plNetMessage* netMsg);

//
// Use to define msg handler fxns in your MsgHandler .cpp file
//
#define MSG_HANDLER_DEFN(handlerClassName, msgClassName) \
plNetMsgHandler::Status handlerClassName::MSG_HANDLER(msgClassName)(plNetMessage*& netMsg)
plNetMsgHandler::Status handlerClassName::MSG_HANDLER(msgClassName)(plNetMessage* netMsg)

//
// Use in the switch statement in your ReceiveMsg function
Expand Down

0 comments on commit bda752f

Please sign in to comment.