MCPcopy Create free account
hub / github.com/ceph/ceph / operator +=

Method operator +=

src/common/buffer.cc:680–703  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

678
679 template<bool is_const>
680 auto buffer::list::iterator_impl<is_const>::operator +=(unsigned o)
681 -> iterator_impl&
682 {
683 //cout << this << " advance " << o << " from " << off
684 // << " (p_off " << p_off << " in " << p->length() << ")"
685 // << std::endl;
686
687 p_off +=o;
688 while (p != ls->end()) {
689 if (p_off >= p->length()) {
690 // skip this buffer
691 p_off -= p->length();
692 p++;
693 } else {
694 // somewhere in this buffer!
695 break;
696 }
697 }
698 if (p == ls->end() && p_off) {
699 throw end_of_buffer();
700 }
701 off += o;
702 return *this;
703 }
704
705 template<bool is_const>
706 void buffer::list::iterator_impl<is_const>::seek(unsigned o)

Callers

nothing calls this directly

Calls 3

end_of_bufferClass · 0.70
endMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected