Enable cpplint and fix cpplint errors in webrtc/api
Adding 'explicit' to these constructors has a low risk of causing
compatibility problems:
explicit RTCConfiguration(RTCConfigurationType type)
explicit IdBase(StatsType type)
BUG=webrtc:5267
TESTED=Fixed issues reported by:
find webrtc/api -type f -name *.cc -o -name *.h | xargs cpplint.py
followed by 'git cl presubmit'.
Review-Url: https://codereview.webrtc.org/2663063003
Cr-Commit-Position: refs/heads/master@{#16392}
diff --git a/webrtc/api/peerconnectioninterface.h b/webrtc/api/peerconnectioninterface.h
index b1b996f..0280c18 100644
--- a/webrtc/api/peerconnectioninterface.h
+++ b/webrtc/api/peerconnectioninterface.h
@@ -288,7 +288,7 @@
// Chrome in particular.
RTCConfiguration() = default;
- RTCConfiguration(RTCConfigurationType type) {
+ explicit RTCConfiguration(RTCConfigurationType type) {
if (type == RTCConfigurationType::kAggressive) {
// These parameters are also defined in Java and IOS configurations,
// so their values may be overwritten by the Java or IOS configuration.
@@ -669,7 +669,7 @@
// Triggered when a remote peer opens a data channel.
virtual void OnDataChannel(
- rtc::scoped_refptr<DataChannelInterface> data_channel){};
+ rtc::scoped_refptr<DataChannelInterface> data_channel) {}
// Deprecated; please use the version that uses a scoped_refptr.
virtual void OnDataChannel(DataChannelInterface* data_channel) {}