Skip to content

Commit 9bcbfea

Browse files
committed
Rename getByteCount() to getPackedByteCount()
1 parent 220342a commit 9bcbfea

File tree

3 files changed

+74
-74
lines changed

3 files changed

+74
-74
lines changed

GeneralsMD/Code/GameEngine/Include/GameNetwork/NetCommandMsg.h

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class NetGameCommandMsg : public NetCommandMsg
8383
void addArgument(const GameMessageArgumentDataType type, GameMessageArgumentType arg);
8484
void setGameMessageType(GameMessage::Type type);
8585

86-
size_t getByteCount() const;
86+
size_t getPackedByteCount() const;
8787

8888
protected:
8989
Int m_numArgs;
@@ -111,7 +111,7 @@ class NetAckBothCommandMsg : public NetCommandMsg
111111
void setOriginalPlayerID(UnsignedByte originalPlayerID);
112112
virtual Int getSortNumber();
113113

114-
static size_t getByteCount();
114+
static size_t getPackedByteCount();
115115

116116
protected:
117117
UnsignedShort m_commandID;
@@ -137,7 +137,7 @@ class NetAckStage1CommandMsg : public NetCommandMsg
137137
void setOriginalPlayerID(UnsignedByte originalPlayerID);
138138
virtual Int getSortNumber();
139139

140-
static size_t getByteCount();
140+
static size_t getPackedByteCount();
141141

142142
protected:
143143
UnsignedShort m_commandID;
@@ -163,7 +163,7 @@ class NetAckStage2CommandMsg : public NetCommandMsg
163163
void setOriginalPlayerID(UnsignedByte originalPlayerID);
164164
virtual Int getSortNumber();
165165

166-
static size_t getByteCount();
166+
static size_t getPackedByteCount();
167167

168168
protected:
169169
UnsignedShort m_commandID;
@@ -181,7 +181,7 @@ class NetFrameCommandMsg : public NetCommandMsg
181181
void setCommandCount(UnsignedShort commandCount);
182182
UnsignedShort getCommandCount();
183183

184-
static size_t getByteCount();
184+
static size_t getPackedByteCount();
185185

186186
protected:
187187
UnsignedShort m_commandCount;
@@ -198,7 +198,7 @@ class NetPlayerLeaveCommandMsg : public NetCommandMsg
198198
UnsignedByte getLeavingPlayerID();
199199
void setLeavingPlayerID(UnsignedByte id);
200200

201-
static size_t getByteCount();
201+
static size_t getPackedByteCount();
202202

203203
protected:
204204
UnsignedByte m_leavingPlayerID;
@@ -217,7 +217,7 @@ class NetRunAheadMetricsCommandMsg : public NetCommandMsg
217217
Int getAverageFps();
218218
void setAverageFps(Int fps);
219219

220-
static size_t getByteCount();
220+
static size_t getPackedByteCount();
221221

222222
protected:
223223
Real m_averageLatency;
@@ -238,7 +238,7 @@ class NetRunAheadCommandMsg : public NetCommandMsg
238238
UnsignedByte getFrameRate();
239239
void setFrameRate(UnsignedByte frameRate);
240240

241-
static size_t getByteCount();
241+
static size_t getPackedByteCount();
242242

243243
protected:
244244
UnsignedShort m_runAhead;
@@ -256,7 +256,7 @@ class NetDestroyPlayerCommandMsg : public NetCommandMsg
256256
UnsignedInt getPlayerIndex();
257257
void setPlayerIndex(UnsignedInt playerIndex);
258258

259-
static size_t getByteCount();
259+
static size_t getPackedByteCount();
260260

261261
protected:
262262
UnsignedInt m_playerIndex;
@@ -270,7 +270,7 @@ class NetKeepAliveCommandMsg : public NetCommandMsg
270270
NetKeepAliveCommandMsg();
271271
//virtual ~NetKeepAliveCommandMsg();
272272

273-
static size_t getByteCount();
273+
static size_t getPackedByteCount();
274274
};
275275

276276
//-----------------------------------------------------------------------------
@@ -281,7 +281,7 @@ class NetDisconnectKeepAliveCommandMsg : public NetCommandMsg
281281
NetDisconnectKeepAliveCommandMsg();
282282
//virtual ~NetDisconnectKeepAliveCommandMsg();
283283

284-
static size_t getByteCount();
284+
static size_t getPackedByteCount();
285285
};
286286

287287
//-----------------------------------------------------------------------------
@@ -298,7 +298,7 @@ class NetDisconnectPlayerCommandMsg : public NetCommandMsg
298298
UnsignedInt getDisconnectFrame();
299299
void setDisconnectFrame(UnsignedInt frame);
300300

301-
static size_t getByteCount();
301+
static size_t getPackedByteCount();
302302

303303
protected:
304304
UnsignedByte m_disconnectSlot;
@@ -313,7 +313,7 @@ class NetPacketRouterQueryCommandMsg : public NetCommandMsg
313313
NetPacketRouterQueryCommandMsg();
314314
//virtual ~NetPacketRouterQueryCommandMsg();
315315

316-
static size_t getByteCount();
316+
static size_t getPackedByteCount();
317317
};
318318

319319
//-----------------------------------------------------------------------------
@@ -324,7 +324,7 @@ class NetPacketRouterAckCommandMsg : public NetCommandMsg
324324
NetPacketRouterAckCommandMsg();
325325
//virtual ~NetPacketRouterAckCommandMsg();
326326

327-
static size_t getByteCount();
327+
static size_t getPackedByteCount();
328328
};
329329

330330
//-----------------------------------------------------------------------------
@@ -338,7 +338,7 @@ class NetDisconnectChatCommandMsg : public NetCommandMsg
338338
UnicodeString getText();
339339
void setText(UnicodeString text);
340340

341-
size_t getByteCount() const;
341+
size_t getPackedByteCount() const;
342342

343343
protected:
344344
UnicodeString m_text;
@@ -358,7 +358,7 @@ class NetChatCommandMsg : public NetCommandMsg
358358
Int getPlayerMask( void );
359359
void setPlayerMask( Int playerMask );
360360

361-
size_t getByteCount() const;
361+
size_t getPackedByteCount() const;
362362

363363
protected:
364364
UnicodeString m_text;
@@ -379,7 +379,7 @@ class NetDisconnectVoteCommandMsg : public NetCommandMsg
379379
UnsignedInt getVoteFrame();
380380
void setVoteFrame(UnsignedInt voteFrame);
381381

382-
static size_t getByteCount();
382+
static size_t getPackedByteCount();
383383

384384
protected:
385385
UnsignedByte m_slot;
@@ -397,7 +397,7 @@ class NetProgressCommandMsg: public NetCommandMsg
397397
UnsignedByte getPercentage();
398398
void setPercentage( UnsignedByte percent );
399399

400-
static size_t getByteCount();
400+
static size_t getPackedByteCount();
401401
protected:
402402
UnsignedByte m_percent;
403403
};
@@ -413,7 +413,7 @@ class NetWrapperCommandMsg : public NetCommandMsg
413413
UnsignedByte * getData();
414414
void setData(UnsignedByte *data, UnsignedInt dataLength);
415415

416-
static size_t getByteCount();
416+
static size_t getPackedByteCount();
417417

418418
UnsignedInt getChunkNumber();
419419
void setChunkNumber(UnsignedInt chunkNumber);
@@ -462,7 +462,7 @@ class NetFileCommandMsg : public NetCommandMsg
462462
UnsignedByte * getFileData();
463463
void setFileData(UnsignedByte *data, UnsignedInt dataLength);
464464

465-
size_t getByteCount() const;
465+
size_t getPackedByteCount() const;
466466

467467
protected:
468468
AsciiString m_portableFilename;
@@ -491,7 +491,7 @@ class NetFileAnnounceCommandMsg : public NetCommandMsg
491491
UnsignedByte getPlayerMask(void);
492492
void setPlayerMask(UnsignedByte playerMask);
493493

494-
size_t getByteCount() const;
494+
size_t getPackedByteCount() const;
495495

496496
protected:
497497
AsciiString m_portableFilename;
@@ -513,7 +513,7 @@ class NetFileProgressCommandMsg : public NetCommandMsg
513513
Int getProgress();
514514
void setProgress(Int val);
515515

516-
static size_t getByteCount();
516+
static size_t getPackedByteCount();
517517

518518
protected:
519519
UnsignedShort m_fileID;
@@ -530,7 +530,7 @@ class NetDisconnectFrameCommandMsg : public NetCommandMsg
530530
UnsignedInt getDisconnectFrame();
531531
void setDisconnectFrame(UnsignedInt disconnectFrame);
532532

533-
static size_t getByteCount();
533+
static size_t getPackedByteCount();
534534

535535
protected:
536536
UnsignedInt m_disconnectFrame;
@@ -546,7 +546,7 @@ class NetDisconnectScreenOffCommandMsg : public NetCommandMsg
546546
UnsignedInt getNewFrame();
547547
void setNewFrame(UnsignedInt newFrame);
548548

549-
static size_t getByteCount();
549+
static size_t getPackedByteCount();
550550

551551
protected:
552552
UnsignedInt m_newFrame;
@@ -562,7 +562,7 @@ class NetFrameResendRequestCommandMsg : public NetCommandMsg
562562
UnsignedInt getFrameToResend();
563563
void setFrameToResend(UnsignedInt frame);
564564

565-
static size_t getByteCount();
565+
static size_t getPackedByteCount();
566566

567567
protected:
568568
UnsignedInt m_frameToResend;

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

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ void NetGameCommandMsg::setGameMessageType(GameMessage::Type type) {
235235
/**
236236
* Get the byte count for this game command message.
237237
*/
238-
size_t NetGameCommandMsg::getByteCount() const {
238+
size_t NetGameCommandMsg::getPackedByteCount() const {
239239
UnsignedShort msglen = sizeof(PackedNetGameCommandMsg);
240240

241241
// Variable data portion
@@ -833,7 +833,7 @@ void NetChatCommandMsg::setPlayerMask( Int playerMask )
833833
/**
834834
* Get the byte count for this chat message.
835835
*/
836-
size_t NetChatCommandMsg::getByteCount() const
836+
size_t NetChatCommandMsg::getPackedByteCount() const
837837
{
838838
return sizeof(PackedNetChatCommandMsg) + sizeof(UnsignedByte) + m_text.getByteCount() + sizeof(m_playerMask);
839839
}
@@ -844,7 +844,7 @@ size_t NetChatCommandMsg::getByteCount() const
844844
/**
845845
* Get the byte count for this disconnect chat message.
846846
*/
847-
size_t NetDisconnectChatCommandMsg::getByteCount() const
847+
size_t NetDisconnectChatCommandMsg::getPackedByteCount() const
848848
{
849849
return sizeof(PackedNetDisconnectChatCommandMsg) + sizeof(UnsignedByte) + m_text.getByteCount();
850850
}
@@ -1033,7 +1033,7 @@ void NetFileCommandMsg::setFileData(UnsignedByte *data, UnsignedInt dataLength)
10331033
/**
10341034
* Get the byte count for this file command message.
10351035
*/
1036-
size_t NetFileCommandMsg::getByteCount() const
1036+
size_t NetFileCommandMsg::getPackedByteCount() const
10371037
{
10381038
return sizeof(PackedNetFileCommandMsg) + m_portableFilename.getLength() + 1 // filename + null terminator
10391039
+ sizeof(UnsignedInt) // file data length
@@ -1082,7 +1082,7 @@ void NetFileAnnounceCommandMsg::setPlayerMask(UnsignedByte playerMask) {
10821082
/**
10831083
* Get the byte count for this file announce command message.
10841084
*/
1085-
size_t NetFileAnnounceCommandMsg::getByteCount() const
1085+
size_t NetFileAnnounceCommandMsg::getPackedByteCount() const
10861086
{
10871087
return sizeof(PackedNetFileAnnounceCommandMsg) + m_portableFilename.getLength() + 1 // filename + null terminator
10881088
+ sizeof(m_fileID) // file ID
@@ -1175,85 +1175,85 @@ void NetFrameResendRequestCommandMsg::setFrameToResend(UnsignedInt frame) {
11751175
}
11761176

11771177
//-------------------------
1178-
// getByteCount() implementations for fixed-size command messages
1178+
// getPackedByteCount() implementations for fixed-size command messages
11791179
//-------------------------
11801180

1181-
size_t NetAckBothCommandMsg::getByteCount() {
1181+
size_t NetAckBothCommandMsg::getPackedByteCount() {
11821182
return sizeof(NetPacketAckCommand);
11831183
}
11841184

1185-
size_t NetFrameCommandMsg::getByteCount() {
1185+
size_t NetFrameCommandMsg::getPackedByteCount() {
11861186
return sizeof(NetPacketFrameCommand);
11871187
}
11881188

1189-
size_t NetKeepAliveCommandMsg::getByteCount() {
1189+
size_t NetKeepAliveCommandMsg::getPackedByteCount() {
11901190
return sizeof(NetPacketKeepAliveCommand);
11911191
}
11921192

1193-
size_t NetWrapperCommandMsg::getByteCount() {
1193+
size_t NetWrapperCommandMsg::getPackedByteCount() {
11941194
return sizeof(NetPacketWrapperCommand);
11951195
}
11961196

1197-
size_t NetAckStage1CommandMsg::getByteCount() {
1197+
size_t NetAckStage1CommandMsg::getPackedByteCount() {
11981198
return sizeof(NetPacketAckCommand);
11991199
}
12001200

1201-
size_t NetAckStage2CommandMsg::getByteCount() {
1201+
size_t NetAckStage2CommandMsg::getPackedByteCount() {
12021202
return sizeof(NetPacketAckCommand);
12031203
}
12041204

1205-
size_t NetPlayerLeaveCommandMsg::getByteCount() {
1205+
size_t NetPlayerLeaveCommandMsg::getPackedByteCount() {
12061206
return sizeof(NetPacketPlayerLeaveCommand);
12071207
}
12081208

1209-
size_t NetRunAheadMetricsCommandMsg::getByteCount() {
1209+
size_t NetRunAheadMetricsCommandMsg::getPackedByteCount() {
12101210
return sizeof(NetPacketRunAheadMetricsCommand);
12111211
}
12121212

1213-
size_t NetRunAheadCommandMsg::getByteCount() const {
1213+
size_t NetRunAheadCommandMsg::getPackedByteCount() const {
12141214
return sizeof(NetPacketRunAheadCommand);
12151215
}
12161216

1217-
size_t NetDestroyPlayerCommandMsg::getByteCount() const {
1217+
size_t NetDestroyPlayerCommandMsg::getPackedByteCount() const {
12181218
return sizeof(NetPacketDestroyPlayerCommand);
12191219
}
12201220

1221-
size_t NetDisconnectKeepAliveCommandMsg::getByteCount() const {
1221+
size_t NetDisconnectKeepAliveCommandMsg::getPackedByteCount() const {
12221222
return sizeof(NetPacketDisconnectKeepAliveCommand);
12231223
}
12241224

1225-
size_t NetDisconnectPlayerCommandMsg::getByteCount() const {
1225+
size_t NetDisconnectPlayerCommandMsg::getPackedByteCount() const {
12261226
return sizeof(NetPacketDisconnectPlayerCommand);
12271227
}
12281228

1229-
size_t NetPacketRouterQueryCommandMsg::getByteCount() const {
1229+
size_t NetPacketRouterQueryCommandMsg::getPackedByteCount() const {
12301230
return sizeof(NetPacketRouterQueryCommand);
12311231
}
12321232

1233-
size_t NetPacketRouterAckCommandMsg::getByteCount() const {
1233+
size_t NetPacketRouterAckCommandMsg::getPackedByteCount() const {
12341234
return sizeof(NetPacketRouterAckCommand);
12351235
}
12361236

1237-
size_t NetDisconnectVoteCommandMsg::getByteCount() const {
1237+
size_t NetDisconnectVoteCommandMsg::getPackedByteCount() const {
12381238
return sizeof(NetPacketDisconnectVoteCommand);
12391239
}
12401240

1241-
size_t NetProgressCommandMsg::getByteCount() const {
1241+
size_t NetProgressCommandMsg::getPackedByteCount() const {
12421242
return sizeof(NetPacketProgressMessage);
12431243
}
12441244

1245-
size_t NetFileProgressCommandMsg::getByteCount() const {
1245+
size_t NetFileProgressCommandMsg::getPackedByteCount() const {
12461246
return sizeof(NetPacketFileProgressCommand);
12471247
}
12481248

1249-
size_t NetDisconnectFrameCommandMsg::getByteCount() const {
1249+
size_t NetDisconnectFrameCommandMsg::getPackedByteCount() const {
12501250
return sizeof(NetPacketDisconnectFrameCommand);
12511251
}
12521252

1253-
size_t NetDisconnectScreenOffCommandMsg::getByteCount() const {
1253+
size_t NetDisconnectScreenOffCommandMsg::getPackedByteCount() const {
12541254
return sizeof(NetPacketDisconnectScreenOffCommand);
12551255
}
12561256

1257-
size_t NetFrameResendRequestCommandMsg::getByteCount() const {
1257+
size_t NetFrameResendRequestCommandMsg::getPackedByteCount() const {
12581258
return sizeof(NetPacketFrameResendRequestCommand);
12591259
}

0 commit comments

Comments
 (0)