MCPcopy Create free account
hub / github.com/ceph/ceph / copy_shallow

Method copy_shallow

src/common/buffer.cc:786–802  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

784 }
785 template<bool is_const>
786 void buffer::list::iterator_impl<is_const>::copy_shallow(unsigned len,
787 ptr &dest)
788 {
789 if (!len) {
790 return;
791 }
792 if (p == ls->end())
793 throw end_of_buffer();
794 unsigned howmuch = p->length() - p_off;
795 if (howmuch < len) {
796 dest = create(len);
797 copy(len, dest.c_str());
798 } else {
799 dest = ptr(*p, p_off, len);
800 *this += len;
801 }
802 }
803
804 template<bool is_const>
805 void buffer::list::iterator_impl<is_const>::copy(unsigned len, list &dest)

Callers 3

TESTFunction · 0.80
decodeFunction · 0.80
decode_noheadFunction · 0.80

Calls 7

end_of_bufferClass · 0.70
createFunction · 0.70
copyFunction · 0.50
ptrFunction · 0.50
endMethod · 0.45
lengthMethod · 0.45
c_strMethod · 0.45

Tested by 1

TESTFunction · 0.64