diff --git a/rtc_base/buffer.h b/rtc_base/buffer.h index 4948aaeff3..eff3e40f0d 100644 --- a/rtc_base/buffer.h +++ b/rtc_base/buffer.h @@ -214,13 +214,15 @@ class BufferT { SetData(w.data(), w.size()); } - // Replace the data in the buffer with at most |max_elements| of data, using + // Replaces the data in the buffer with at most |max_elements| of data, using // the function |setter|, which should have the following signature: + // // size_t setter(ArrayView view) - // |setter| is given an appropriately typed ArrayView of the area in which to - // write the data (i.e. starting at the beginning of the buffer) and should - // return the number of elements actually written. This number must be <= - // |max_elements|. + // + // |setter| is given an appropriately typed ArrayView of length exactly + // |max_elements| that describes the area where it should write the data; it + // should return the number of elements actually written. (If it doesn't fill + // the whole ArrayView, it should leave the unused space at the end.) template view) - // |setter| is given an appropriately typed ArrayView of the area in which to - // write the data (i.e. starting at the former end of the buffer) and should - // return the number of elements actually written. This number must be <= - // |max_elements|. + // + // |setter| is given an appropriately typed ArrayView of length exactly + // |max_elements| that describes the area where it should write the data; it + // should return the number of elements actually written. (If it doesn't fill + // the whole ArrayView, it should leave the unused space at the end.) template