MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / PutBuffer

Method PutBuffer

src/core/string_inplace.cpp:35–41  ·  view source on GitHub ↗

* Append buffer. */

Source from the content-addressed store, hash-verified

33 * Append buffer.
34 */
35void InPlaceBuilder::PutBuffer(std::span<const char> str)
36{
37 auto unused = this->GetBytesUnused();
38 if (str.size() > unused) NOT_REACHED();
39 std::ranges::copy(str, this->dest.data() + this->position);
40 this->position += str.size();
41}
42
43/**
44 * Create coupled Consumer+Builder pair.

Callers 2

PutMethod · 0.45
PutIntegerBaseMethod · 0.45

Calls 5

GetBytesUnusedMethod · 0.95
NOT_REACHEDFunction · 0.85
copyFunction · 0.85
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected