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:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user