From 9e1a6d7c236c9a8a322bef54d4ec2a087e5baa07 Mon Sep 17 00:00:00 2001 From: Karl Wiberg Date: Thu, 30 Apr 2015 14:25:03 +0200 Subject: rtc::Buffer: Remove backwards compatibility band-aids This CL makes two changes to rtc::Buffer that have had to wait for Chromium's use of it to be modernized: 1. Change default return type of rtc::Buffer::data() from char* to uint8_t*. uint8_t is a more natural type for bytes, and won't accidentally convert to a string. (Chromium previously expected the default return type to be char, which is why rtc::Buffer::data() initially got char as default return type in 9478437f, but that's been fixed now.) 2. Stop accepting void* inputs in constructors and methods. While this is convenient, it's also dangerous since any pointer type will implicitly convert to void*. R=tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/44269004 Cr-Commit-Position: refs/heads/master@{#9121} --- talk/session/media/channel.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'talk/session') diff --git a/talk/session/media/channel.cc b/talk/session/media/channel.cc index 1ce65fafd0..0034f15d9b 100644 --- a/talk/session/media/channel.cc +++ b/talk/session/media/channel.cc @@ -512,7 +512,7 @@ bool BaseChannel::SendPacket(bool rtcp, rtc::Buffer* packet, // Protect if needed. if (srtp_filter_.IsActive()) { bool res; - uint8_t* data = packet->data(); + uint8_t* data = packet->data(); int len = static_cast(packet->size()); if (!rtcp) { // If ENABLE_EXTERNAL_AUTH flag is on then packet authentication is not done -- cgit v1.2.3