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

Method Skip

src/core/string_consumer.cpp:97–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97void StringConsumer::Skip(size_type len)
98{
99 if (len == std::string_view::npos) {
100 this->position = this->src.size();
101 } else if (size_type max_len = GetBytesLeft(); len > max_len) {
102 LogError(fmt::format("Source buffer too short: {} > {}", len, max_len));
103 this->position = this->src.size();
104 } else {
105 this->position += len;
106 }
107}
108
109StringConsumer::size_type StringConsumer::Find(std::string_view str) const
110{

Callers 15

SkipUint8Method · 0.95
SkipSint8Method · 0.95
SkipUint16LEMethod · 0.95
SkipSint16LEMethod · 0.95
SkipUint32LEMethod · 0.95
SkipSint32LEMethod · 0.95
SkipUint64LEMethod · 0.95
SkipSint64LEMethod · 0.95
SkipCharMethod · 0.95
TryReadUtf8Method · 0.95
ReadUtf8Method · 0.95
SkipUtf8Method · 0.95

Calls 2

formatFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected