MCPcopy Create free account
hub / github.com/NoMercy-ac/NoMercy / GetStringFromArray

Method GetStringFromArray

Source/Client/NM_Engine/NetworkAdapter.cpp:234–243  ·  view source on GitHub ↗

/////////////////////////////////////////////////////// Desc: Generic function to grab a string from an array. purpose of this function is just to add error checking. ///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

232// checking.
233////////////////////////////////////////////////////////////
234std::string CNetworkAdapter::GetStringFromArray(const StringArray* pPtr, int nIndex) const
235{
236 std::string sStr = "";
237 if (pPtr && ((SIZE_T)nIndex < pPtr->size()))
238 {
239 sStr = (*pPtr)[nIndex];
240 }
241
242 return sStr;
243}
244
245////////////////////////////////////////////////////////////
246// Desc:

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected