MCPcopy Create free account
hub / github.com/apache/fory / copy_from

Method copy_from

cpp/fory/util/buffer.cc:129–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129void Buffer::copy_from(uint32_t offset, const uint8_t *src, uint32_t src_offset,
130 uint32_t nbytes) {
131 auto new_size = offset + nbytes;
132 if (new_size > size_) {
133 reserve(new_size * 2);
134 }
135 std::memcpy(data_ + offset, src + src_offset, static_cast<size_t>(nbytes));
136}
137
138std::string Buffer::to_string() const {
139 return std::string(reinterpret_cast<const char *>(data_),

Callers 1

array_data_fromFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected