Index: webrtc/base/buffer.h |
diff --git a/webrtc/base/buffer.h b/webrtc/base/buffer.h |
index 0ef1e3b5c8a70a99068cbcf2ce32ac5e5da8d06f..aabd6d6ec4b4bd7ec226ea6f35f410052c4d2ca1 100644 |
--- a/webrtc/base/buffer.h |
+++ b/webrtc/base/buffer.h |
@@ -124,6 +124,9 @@ class Buffer { |
bool operator!=(const Buffer& buf) const { return !(*this == buf); } |
+ uint8_t& operator[](size_t index) { return data()[index]; } |
+ uint8_t operator[](size_t index) const { return data()[index]; } |
kwiberg-webrtc
2016/02/29 12:40:46
It's probably a good idea to DCHECK that the index
ossu
2016/02/29 12:48:53
Acknowledged.
|
+ |
// The SetData functions replace the contents of the buffer. They accept the |
// same input types as the constructors. |
template <typename T, typename internal::ByteType<T>::t = 0> |