MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / CopyString

Method CopyString

src/core/wchar16.cpp:315–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315void wc16_string_impl::CopyString(const wc16_string_impl& rhs)
316{
317 ASSERT(refCount == 1);
318
319 int newlen = rhs.length;
320
321 if (rhs.length != this->length)
322 {
323 delete [] pString;
324 pString = new WCHAR16[newlen + 1];
325 this->length = newlen;
326 }
327
328 memcpy(this->pString, rhs.pString, newlen * sizeof(WCHAR16));
329}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected