Enable cpplint in pc/
Enable cpplint check in the PRESUBMIT for pc/ and fix all existing
warnings.
Bug: webrtc:5583
Change-Id: If39994692ab6f6f3c83c74f23850f02fdfe810e8
Reviewed-on: https://webrtc-review.googlesource.com/16540
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20482}
diff --git a/pc/mediasession.cc b/pc/mediasession.cc
index 835f76d..3ca1074 100644
--- a/pc/mediasession.cc
+++ b/pc/mediasession.cc
@@ -2430,9 +2430,9 @@
// Non-const versions of the above functions.
//
-ContentInfo* GetFirstMediaContent(ContentInfos& contents,
+ContentInfo* GetFirstMediaContent(ContentInfos* contents,
MediaType media_type) {
- for (ContentInfo& content : contents) {
+ for (ContentInfo& content : *contents) {
if (IsMediaContentOfType(&content, media_type)) {
return &content;
}
@@ -2440,15 +2440,15 @@
return nullptr;
}
-ContentInfo* GetFirstAudioContent(ContentInfos& contents) {
+ContentInfo* GetFirstAudioContent(ContentInfos* contents) {
return GetFirstMediaContent(contents, MEDIA_TYPE_AUDIO);
}
-ContentInfo* GetFirstVideoContent(ContentInfos& contents) {
+ContentInfo* GetFirstVideoContent(ContentInfos* contents) {
return GetFirstMediaContent(contents, MEDIA_TYPE_VIDEO);
}
-ContentInfo* GetFirstDataContent(ContentInfos& contents) {
+ContentInfo* GetFirstDataContent(ContentInfos* contents) {
return GetFirstMediaContent(contents, MEDIA_TYPE_DATA);
}
@@ -2458,7 +2458,7 @@
return nullptr;
}
- return GetFirstMediaContent(sdesc->contents(), media_type);
+ return GetFirstMediaContent(&sdesc->contents(), media_type);
}
ContentInfo* GetFirstAudioContent(SessionDescription* sdesc) {