Lines Matching refs:count
42 // Writes up to min(wleft(), |count|) bytes from buffer pointed by
44 size_t write(const void *src, size_t count) {
45 count = std::min(count, wleft());
47 last = std::copy_n(p, count, last);
48 return count;
50 size_t write(size_t count) {
51 count = std::min(count, wleft());
52 last += count;
53 return count;
55 // Drains min(rleft(), |count|) bytes from start of the buffer.
56 size_t drain(size_t count) {
57 count = std::min(count, rleft());
58 pos += count;
59 return count;
61 size_t drain_reset(size_t count) {
62 count = std::min(count, rleft());
63 std::copy(pos + count, last, std::begin(buf));
64 last = std::begin(buf) + (last - (pos + count));
66 return count;