Fix CopyOnWriteBuffer::cdata to return const pointer

to prevent unexpected data modification.

Review-Url: https://codereview.webrtc.org/2189013002
Cr-Commit-Position: refs/heads/master@{#13583}
This commit is contained in:
danilchap
2016-07-30 13:42:27 -07:00
committed by Commit bot
parent d8a9c5306b
commit 8a0b1287cd

View File

@ -89,7 +89,7 @@ class CopyOnWriteBuffer {
template <typename T = uint8_t,
typename std::enable_if<
internal::BufferCompat<uint8_t, T>::value>::type* = nullptr>
T* cdata() const {
const T* cdata() const {
RTC_DCHECK(IsConsistent());
if (!buffer_) {
return nullptr;