Skip to content

Commit 220342a

Browse files
committed
Fix NetPacket.cpp to use static getByteCount() calls correctly
1 parent 2514001 commit 220342a

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

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

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -342,67 +342,67 @@ UnsignedInt NetPacket::GetBufferSizeNeededForCommand(NetCommandMsg *msg) {
342342
}
343343

344344
UnsignedInt NetPacket::GetGameCommandSize(NetCommandMsg *msg) {
345-
return msg->getByteCount();
345+
return static_cast<NetGameCommandMsg*>(msg)->getByteCount();
346346
}
347347

348348
UnsignedInt NetPacket::GetAckCommandSize(NetCommandMsg *msg) {
349-
return msg->getByteCount();
349+
return NetAckBothCommandMsg::getByteCount();
350350
}
351351

352352
UnsignedInt NetPacket::GetFrameCommandSize(NetCommandMsg *msg) {
353-
return msg->getByteCount();
353+
return NetFrameCommandMsg::getByteCount();
354354
}
355355

356356
UnsignedInt NetPacket::GetPlayerLeaveCommandSize(NetCommandMsg *msg) {
357-
return msg->getByteCount();
357+
return NetPlayerLeaveCommandMsg::getByteCount();
358358
}
359359

360360
UnsignedInt NetPacket::GetRunAheadMetricsCommandSize(NetCommandMsg *msg) {
361-
return msg->getByteCount();
361+
return NetRunAheadMetricsCommandMsg::getByteCount();
362362
}
363363

364364
UnsignedInt NetPacket::GetRunAheadCommandSize(NetCommandMsg *msg) {
365-
return msg->getByteCount();
365+
return NetRunAheadCommandMsg::getByteCount();
366366
}
367367

368368
UnsignedInt NetPacket::GetDestroyPlayerCommandSize(NetCommandMsg *msg) {
369-
return msg->getByteCount();
369+
return NetDestroyPlayerCommandMsg::getByteCount();
370370
}
371371

372372
UnsignedInt NetPacket::GetKeepAliveCommandSize(NetCommandMsg *msg) {
373-
return msg->getByteCount();
373+
return NetKeepAliveCommandMsg::getByteCount();
374374
}
375375

376376
UnsignedInt NetPacket::GetDisconnectKeepAliveCommandSize(NetCommandMsg *msg) {
377-
return msg->getByteCount();
377+
return NetDisconnectKeepAliveCommandMsg::getByteCount();
378378
}
379379

380380
UnsignedInt NetPacket::GetDisconnectPlayerCommandSize(NetCommandMsg *msg) {
381-
return msg->getByteCount();
381+
return NetDisconnectPlayerCommandMsg::getByteCount();
382382
}
383383

384384
UnsignedInt NetPacket::GetPacketRouterQueryCommandSize(NetCommandMsg *msg) {
385-
return msg->getByteCount();
385+
return NetPacketRouterQueryCommandMsg::getByteCount();
386386
}
387387

388388
UnsignedInt NetPacket::GetPacketRouterAckCommandSize(NetCommandMsg *msg) {
389-
return msg->getByteCount();
389+
return NetPacketRouterAckCommandMsg::getByteCount();
390390
}
391391

392392
UnsignedInt NetPacket::GetDisconnectChatCommandSize(NetCommandMsg *msg) {
393-
return msg->getByteCount();
393+
return static_cast<NetDisconnectChatCommandMsg*>(msg)->getByteCount();
394394
}
395395

396396
UnsignedInt NetPacket::GetDisconnectVoteCommandSize(NetCommandMsg *msg) {
397-
return msg->getByteCount();
397+
return NetDisconnectVoteCommandMsg::getByteCount();
398398
}
399399

400400
UnsignedInt NetPacket::GetChatCommandSize(NetCommandMsg *msg) {
401-
return msg->getByteCount();
401+
return static_cast<NetChatCommandMsg*>(msg)->getByteCount();
402402
}
403403

404404
UnsignedInt NetPacket::GetProgressMessageSize(NetCommandMsg *msg) {
405-
return msg->getByteCount();
405+
return NetProgressCommandMsg::getByteCount();
406406
}
407407

408408
UnsignedInt NetPacket::GetLoadCompleteMessageSize(NetCommandMsg *msg) {
@@ -414,31 +414,31 @@ UnsignedInt NetPacket::GetTimeOutGameStartMessageSize(NetCommandMsg *msg) {
414414
}
415415

416416
UnsignedInt NetPacket::GetWrapperCommandSize(NetCommandMsg *msg) {
417-
return msg->getByteCount();
417+
return NetWrapperCommandMsg::getByteCount();
418418
}
419419

420420
UnsignedInt NetPacket::GetFileCommandSize(NetCommandMsg *msg) {
421-
return msg->getByteCount();
421+
return static_cast<NetFileCommandMsg*>(msg)->getByteCount();
422422
}
423423

424424
UnsignedInt NetPacket::GetFileAnnounceCommandSize(NetCommandMsg *msg) {
425-
return msg->getByteCount();
425+
return static_cast<NetFileAnnounceCommandMsg*>(msg)->getByteCount();
426426
}
427427

428428
UnsignedInt NetPacket::GetFileProgressCommandSize(NetCommandMsg *msg) {
429-
return msg->getByteCount();
429+
return NetFileProgressCommandMsg::getByteCount();
430430
}
431431

432432
UnsignedInt NetPacket::GetDisconnectFrameCommandSize(NetCommandMsg *msg) {
433-
return msg->getByteCount();
433+
return NetDisconnectFrameCommandMsg::getByteCount();
434434
}
435435

436436
UnsignedInt NetPacket::GetDisconnectScreenOffCommandSize(NetCommandMsg *msg) {
437-
return msg->getByteCount();
437+
return NetDisconnectScreenOffCommandMsg::getByteCount();
438438
}
439439

440440
UnsignedInt NetPacket::GetFrameResendRequestCommandSize(NetCommandMsg *msg) {
441-
return msg->getByteCount();
441+
return NetFrameResendRequestCommandMsg::getByteCount();
442442
}
443443

444444

0 commit comments

Comments
 (0)