MCPcopy Create free account
hub / github.com/anjo76/angelscript / operator+

Function operator+

sdk/tests/test_feature/source/scriptstring.cpp:142–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140//-----------------
141
142CScriptString *operator+(const CScriptString &a, const CScriptString &b)
143{
144 // Return a new object as a script handle
145 CScriptString *str = new CScriptString();
146
147 // Avoid unnecessary memory copying by first reserving the full memory buffer, then concatenating
148 str->buffer.reserve(a.buffer.length() + b.buffer.length());
149 str->buffer += a.buffer;
150 str->buffer += b.buffer;
151
152 return str;
153}
154
155static void ConcatenateStrings_Generic(asIScriptGeneric *gen)
156{

Callers

nothing calls this directly

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected