MCPcopy Create free account
hub / github.com/bytedance/bolt / nextView

Method nextView

bolt/common/memory/ByteStream.cpp:162–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162std::string_view ByteInputStream::nextView(int32_t size) {
163 if (current_->position == current_->size) {
164 if (current_ == &ranges_.back()) {
165 return std::string_view(nullptr, 0);
166 }
167 next();
168 }
169 BOLT_CHECK(current_->size);
170 auto position = current_->position;
171 auto viewSize = std::min(current_->size - current_->position, size);
172 current_->position += viewSize;
173 return std::string_view(
174 reinterpret_cast<char*>(current_->buffer) + position, viewSize);
175}
176
177void ByteInputStream::skip(int32_t size) {
178 for (;;) {

Callers 9

ReadMethod · 0.45
computeChecksumFunction · 0.45
deserializeMethod · 0.45
concatenatePartialRowMethod · 0.45
compareStringAscFunction · 0.45
readStringViewFunction · 0.45
compareStringAscFunction · 0.45
readStringViewFunction · 0.45
TEST_PFunction · 0.45

Calls 2

backMethod · 0.80
minFunction · 0.50

Tested by

no test coverage detected