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/proxy.h b/webrtc/api/proxy.h
index 51cdd29..f834790 100644
--- a/webrtc/api/proxy.h
+++ b/webrtc/api/proxy.h
@@ -52,6 +52,7 @@
#define WEBRTC_API_PROXY_H_
#include <memory>
+#include <utility>
#include "webrtc/base/event.h"
#include "webrtc/base/thread.h"
@@ -349,6 +350,7 @@
T5 a5_;
};
+
// Helper macros to reduce code duplication.
#define PROXY_MAP_BOILERPLATE(c) \
template <class INTERNAL_CLASS> \
@@ -363,6 +365,9 @@
const INTERNAL_CLASS* internal() const { return c_.get(); } \
INTERNAL_CLASS* internal() { return c_.get(); }
+#define END_PROXY_MAP() \
+ };
+
#define SIGNALING_PROXY_MAP_BOILERPLATE(c) \
protected: \
c##ProxyWithInternal(rtc::Thread* signaling_thread, INTERNAL_CLASS* c) \
@@ -448,13 +453,13 @@
private: \
rtc::Thread* destructor_thread() const { return signaling_thread_; } \
\
- public:
+ public: // NOLINTNEXTLINE
#define PROXY_WORKER_THREAD_DESTRUCTOR() \
private: \
rtc::Thread* destructor_thread() const { return worker_thread_; } \
\
- public:
+ public: // NOLINTNEXTLINE
#define PROXY_METHOD0(r, method) \
r method() override { \
@@ -549,10 +554,6 @@
return call.Marshal(RTC_FROM_HERE, worker_thread_); \
}
-#define END_PROXY_MAP() \
- } \
- ;
-
} // namespace webrtc
#endif // WEBRTC_API_PROXY_H_