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

Method IdxGetRaw

engine/Poseidon/Network/NetworkMsgContext.cpp:504–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502
503// transfer raw data; optimized memory allocation, as there is no need to
504// create a temporary AutoArray<char> buffer
505
506TMError NetworkMessageContext::IdxGetRaw(int index, void*& value, int& size)
507{
508 NET_ERROR(!_sending);
509 TRANSFER_FORMAT
510 const RefNetworkData& val = _msg->values[index];
511 CHECK_ASSIGN(valTyped, val, const RefNetworkDataTyped<AutoArray<char>>)
512 value = valTyped.GetVal().Data();
513 size = valTyped.GetVal().Size();
514 return TMOK;
515}
516

Callers 2

TransferMsgMethod · 0.80
TransferMsgMethod · 0.80

Calls 2

DataMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected