MCPcopy Create free account
hub / github.com/boostorg/asio / commit

Function commit

include/boost/asio/buffer.hpp:1973–1977  ·  view source on GitHub ↗

@b DynamicBuffer_v1: Move bytes from the output sequence to the input sequence. * @param n The number of bytes to append from the start of the output * sequence to the end of the input sequence. The remainder of the output * sequence is discarded. * * Requires a preceding call prepare(x) where x >= n , and * no intervening operations that modify the input or output

Source from the content-addressed store, hash-verified

1971 * output sequence is moved to the input sequence and no error is issued.
1972 */
1973 void commit(std::size_t n)
1974 {
1975 size_ += (std::min)(n, string_.size() - size_);
1976 string_.resize(size_);
1977 }
1978#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1979
1980 /// @b DynamicBuffer_v2: Grow the underlying memory by the specified number of

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected