MCPcopy Create free account
hub / github.com/ElementsProject/elements / ignore

Method ignore

src/streams.h:298–311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296 }
297
298 void ignore(size_t num_ignore)
299 {
300 // Ignore from the beginning of the buffer
301 auto next_read_pos{CheckedAdd(m_read_pos, num_ignore)};
302 if (!next_read_pos.has_value() || next_read_pos.value() > vch.size()) {
303 throw std::ios_base::failure("CDataStream::ignore(): end of data");
304 }
305 if (next_read_pos.value() == vch.size()) {
306 m_read_pos = 0;
307 vch.clear();
308 return;
309 }
310 m_read_pos = next_read_pos.value();
311 }
312
313 void write(Span<const value_type> src)
314 {

Callers

nothing calls this directly

Calls 4

CheckedAddFunction · 0.85
valueMethod · 0.45
sizeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected