MCPcopy Create free account
hub / github.com/OpenArkStudio/ARK / InitWithTwo

Method InitWithTwo

src/base/AFString.hpp:367–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

365 }
366
367 void InitWithTwo(const TYPE* value1, size_t size1, const TYPE* value2, size_t size2)
368 {
369 mnSize = size1 + size2;
370
371 if (mnSize < SIZE)
372 {
373 mnCapacity = SIZE;
374 mpData = mxStack;
375 }
376 else
377 {
378 mnCapacity = (mnSize + 1) * 2;
379 mpData = (TYPE*)mxAlloc.Alloc(mnCapacity * sizeof(TYPE));
380 }
381
382 TRAITS::Copy(mpData, value1, size1);
383 TRAITS::Copy(mpData + size1, value2, size2);
384 TRAITS::Put(mpData + size1 + size2, 0);
385 }
386
387 self_t& InnerAssign(const TYPE* src, size_t len)
388 {

Callers

nothing calls this directly

Calls 1

AllocMethod · 0.45

Tested by

no test coverage detected