MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / clone

Method clone

source/core/StarBuffer.cpp:277–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275}
276
277IODevicePtr Buffer::clone() {
278 auto cloned = make_shared<Buffer>(*this);
279 // Reset position to 0 while preserving mode and data
280 cloned->seek(0);
281 return cloned;
282}
283
284IODevicePtr ExternalBuffer::clone() {
285 Logger::info("Cloning ExternalBuffer from position {}");

Callers

nothing calls this directly

Calls 1

seekMethod · 0.45

Tested by

no test coverage detected