| 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) |