MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / CloneAllocName

Function CloneAllocName

Source/Engine/Networking/NetworkManager.cpp:120–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118 });
119
120FORCE_INLINE StringAnsiView CloneAllocName(const StringAnsiView& name)
121{
122 StringAnsiView result;
123 if (name.Get())
124 {
125 const int32 length = name.Length();
126 char* str = (char*)Allocator::Allocate(length + 1);
127 Platform::MemoryCopy(str, name.Get(), length);
128 str[length] = 0;
129 result = StringAnsiView(str, length);
130 }
131 return result;
132}
133
134FORCE_INLINE bool IsNetworkKeyValid(uint32 index)
135{

Callers 3

WriteNetworkNameMethod · 0.85
ReadNetworkNameMethod · 0.85
OnNetworkMessageKeyFunction · 0.85

Calls 3

StringAnsiViewClass · 0.50
GetMethod · 0.45
LengthMethod · 0.45

Tested by

no test coverage detected