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

Method tellp

bolt/common/memory/ByteStream.cpp:89–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89std::streampos ByteInputStream::tellp() const {
90 if (ranges_.empty()) {
91 return 0;
92 }
93 assert(current_);
94 int64_t size = 0;
95 for (auto& range : ranges_) {
96 if (&range == current_) {
97 return current_->position + size;
98 }
99 size += range.size;
100 }
101 BOLT_FAIL("ByteInputStream 'current_' is not in 'ranges_'.");
102}
103
104void ByteInputStream::seekp(std::streampos position) {
105 if (ranges_.empty() && position == 0) {

Callers 6

TEST_FFunction · 0.45
flushMethod · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_PFunction · 0.45
TEST_FFunction · 0.45

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected