MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / copy

Method copy

3rd/asio-1.24.0/include/asio/impl/buffered_write_stream.hpp:471–482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

469template <typename Stream>
470template <typename ConstBufferSequence>
471std::size_t buffered_write_stream<Stream>::copy(
472 const ConstBufferSequence& buffers)
473{
474 using asio::buffer_size;
475 std::size_t orig_size = storage_.size();
476 std::size_t space_avail = storage_.capacity() - orig_size;
477 std::size_t bytes_avail = buffer_size(buffers);
478 std::size_t length = bytes_avail < space_avail ? bytes_avail : space_avail;
479 storage_.resize(orig_size + length);
480 return asio::buffer_copy(
481 storage_.data() + orig_size, buffers, length);
482}
483
484} // namespace asio
485

Callers 13

write_someMethod · 0.95
GetShellCommandOutputFunction · 0.45
InvokeWithModifiedEnvFunction · 0.45
_GetXmlOutputMethod · 0.45
_GetOutputMethod · 0.45
RunAndReturnOutputFunction · 0.45
any_executor_baseMethod · 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 6

GetShellCommandOutputFunction · 0.36
InvokeWithModifiedEnvFunction · 0.36
_GetXmlOutputMethod · 0.36
_GetOutputMethod · 0.36
RunAndReturnOutputFunction · 0.36