| 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 | { |
nothing calls this directly
no test coverage detected