MCPcopy Create free account
hub / github.com/arvidn/libtorrent / copy_buffers

Function copy_buffers

test/test_buffer.cpp:164–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162
163template <class T>
164int copy_buffers(T const& b, char* target)
165{
166 int copied = 0;
167 for (auto const& i : b)
168 {
169 memcpy(target, i.data(), i.size());
170 target += i.size();
171 copied += int(i.size());
172 }
173 return copied;
174}
175
176bool compare_chained_buffer(chained_buffer& b, char const* mem, int size)
177{

Callers 1

compare_chained_bufferFunction · 0.85

Calls 2

dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected