MCPcopy Create free account
hub / github.com/cinit/TMoe / copy

Method copy

app/src/main/cpp/utils/SharedBuffer.cpp:125–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125SharedBuffer SharedBuffer::copy() const {
126 SharedBuffer other;
127 if (get() != nullptr && size() > 0) {
128 other.ensureCapacity(size());
129 memcpy(other.get(), get(), size());
130 }
131 return other;
132}
133
134bool SharedBuffer::ensureCapacity(size_t size, std::nothrow_t) noexcept {
135 SharedBufferImpl *p = pImpl.get();

Callers

nothing calls this directly

Calls 2

ensureCapacityMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected