MCPcopy Create free account
hub / github.com/bab2min/tomotopy / init

Method init

src/Utils/SharedString.cpp:25–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23 }
24
25 void SharedString::init(const char* _begin, const char* _end)
26 {
27 ptr = new char[_end - _begin + 9];
28 *(size_t*)ptr = 1;
29 len = _end - _begin;
30 std::memcpy((void*)(ptr + 8), _begin, _end - _begin);
31 ((char*)ptr)[_end - _begin + 8] = 0;
32 }
33
34 SharedString::SharedString()
35 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected