MCPcopy Create free account
hub / github.com/cinder/Cinder / copy

Method copy

include/asio/impl/buffered_write_stream.hpp:492–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

490template <typename Stream>
491template <typename ConstBufferSequence>
492std::size_t buffered_write_stream<Stream>::copy(
493 const ConstBufferSequence& buffers)
494{
495 using asio::buffer_size;
496 std::size_t orig_size = storage_.size();
497 std::size_t space_avail = storage_.capacity() - orig_size;
498 std::size_t bytes_avail = buffer_size(buffers);
499 std::size_t length = bytes_avail < space_avail ? bytes_avail : space_avail;
500 storage_.resize(orig_size + length);
501 return asio::buffer_copy(
502 storage_.data() + orig_size, buffers, length);
503}
504
505} // namespace asio
506

Callers 3

write_someMethod · 0.95
any_executor_baseMethod · 0.45
any_executor_baseClass · 0.45

Calls 6

buffer_sizeFunction · 0.85
buffer_copyFunction · 0.85
sizeMethod · 0.45
capacityMethod · 0.45
resizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected