Skip to content

Commit c7d626b

Browse files
committed
refactor: replace C-style casts with static_cast
1 parent 6e6d6b8 commit c7d626b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

GeneralsMD/Code/GameEngine/Source/GameNetwork/NetPacket.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ UnsignedInt NetPacket::GetPacketRouterAckCommandSize(NetCommandMsg *msg) {
465465
}
466466

467467
UnsignedInt NetPacket::GetDisconnectChatCommandSize(NetCommandMsg *msg) {
468-
NetDisconnectChatCommandMsg *cmdMsg = (NetDisconnectChatCommandMsg *)(msg);
468+
NetDisconnectChatCommandMsg *cmdMsg = static_cast<NetDisconnectChatCommandMsg*>(msg);
469469
UnsignedByte textmsglen = cmdMsg->getText().getLength();
470470
return sizeof(NetPacketDisconnectChatCommandHeader) + (textmsglen * sizeof(UnsignedShort));
471471
}
@@ -475,7 +475,7 @@ UnsignedInt NetPacket::GetDisconnectVoteCommandSize(NetCommandMsg *msg) {
475475
}
476476

477477
UnsignedInt NetPacket::GetChatCommandSize(NetCommandMsg *msg) {
478-
NetChatCommandMsg *cmdMsg = (NetChatCommandMsg *)(msg);
478+
NetChatCommandMsg *cmdMsg = static_cast<NetChatCommandMsg*>(msg);
479479
UnsignedByte textmsglen = cmdMsg->getText().getLength();
480480
return sizeof(NetPacketChatCommandHeader) + (textmsglen * sizeof(UnsignedShort)) + sizeof(Int);
481481
}

0 commit comments

Comments
 (0)