MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / Add

Method Add

engine/Poseidon/Network/NetworkMisc.cpp:487–515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485 else
486 {
487 _logoUrl = RString();
488 _logoFile = RString();
489 }
490
491 return true;
492}
493
494// Voting system
495
496bool Vote::HasValue(const char* val, int valueSize) const
497{
498 if (valueSize != value.Size())
499 {
500 return false;
501 }
502 return memcmp(val, value.Data(), valueSize) == 0;
503}
504
505int Voting::Add(int player, char* value, int valueSize)
506{
507 int index = -1;
508 for (int i = 0; i < Size(); i++)
509 {
510 if (Get(i).player == player)
511 {
512 index = i;
513 break;
514 }
515 }
516 if (index < 0)
517 {
518 index = base::Add();

Callers 6

AUTO_STATIC_ARRAYFunction · 0.45
ReceiveFileSegmentMethod · 0.45
StatMsgSentMethod · 0.45
StatMsgReceivedMethod · 0.45
StatRawMsgSentMethod · 0.45
StatRawMsgReceivedMethod · 0.45

Calls 12

AddClass · 0.85
SetClass · 0.85
HasIDMethod · 0.80
ApplyVotingMethod · 0.80
GetIDMethod · 0.80
GetFunction · 0.50
ReallocMethod · 0.45
ResizeMethod · 0.45
DataMethod · 0.45
CheckMethod · 0.45
GetIdentitiesMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected