Enable cpplint for webrtc/examples and fix all uncovered cpplint errors.
BUG=webrtc:5273
TESTED=Fixed issues reported by:
find webrtc/examples/ -type f -name *.cc -o -name *.h | grep -v objc | xargs cpplint.py
followed by 'git cl presubmit'.
NOTRY=True
Review URL: https://codereview.webrtc.org/1504283004
Cr-Commit-Position: refs/heads/master@{#10960}
diff --git a/webrtc/examples/peerconnection/client/linux/main.cc b/webrtc/examples/peerconnection/client/linux/main.cc
index cf88c36..4db929c 100644
--- a/webrtc/examples/peerconnection/client/linux/main.cc
+++ b/webrtc/examples/peerconnection/client/linux/main.cc
@@ -30,7 +30,7 @@
// Override so that we can also pump the GTK message loop.
virtual bool Wait(int cms, bool process_io) {
// Pump GTK events.
- // TODO: We really should move either the socket server or UI to a
+ // TODO(henrike): We really should move either the socket server or UI to a
// different thread. Alternatively we could look at merging the two loops
// by implementing a dispatcher for the socket server and/or use
// g_main_context_set_poll_func.
@@ -96,10 +96,12 @@
wnd.Destroy();
thread->set_socketserver(NULL);
- // TODO: Run the Gtk main loop to tear down the connection.
- //while (gtk_events_pending()) {
- // gtk_main_iteration();
- //}
+ // TODO(henrike): Run the Gtk main loop to tear down the connection.
+ /*
+ while (gtk_events_pending()) {
+ gtk_main_iteration();
+ }
+ */
rtc::CleanupSSL();
return 0;
}
diff --git a/webrtc/examples/peerconnection/client/linux/main_wnd.cc b/webrtc/examples/peerconnection/client/linux/main_wnd.cc
index 254fb94..cf98c1c 100644
--- a/webrtc/examples/peerconnection/client/linux/main_wnd.cc
+++ b/webrtc/examples/peerconnection/client/linux/main_wnd.cc
@@ -116,7 +116,8 @@
wnd->OnRedraw();
return false;
}
-} // end anonymous
+
+} // namespace
//
// GtkMainWnd implementation.
@@ -174,7 +175,8 @@
local_renderer_.reset();
}
-void GtkMainWnd::StartRemoteRenderer(webrtc::VideoTrackInterface* remote_video) {
+void GtkMainWnd::StartRemoteRenderer(
+ webrtc::VideoTrackInterface* remote_video) {
remote_renderer_.reset(new VideoRenderer(this, remote_video));
}
@@ -488,7 +490,7 @@
static_cast<int>(frame->GetHeight()));
int size = width_ * height_ * 4;
- // TODO: Convert directly to RGBA
+ // TODO(henrike): Convert directly to RGBA
frame->ConvertToRgbBuffer(cricket::FOURCC_ARGB,
image_.get(),
size,
diff --git a/webrtc/examples/peerconnection/client/linux/main_wnd.h b/webrtc/examples/peerconnection/client/linux/main_wnd.h
index 1a91082..e35d4dd 100644
--- a/webrtc/examples/peerconnection/client/linux/main_wnd.h
+++ b/webrtc/examples/peerconnection/client/linux/main_wnd.h
@@ -8,8 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef PEERCONNECTION_SAMPLES_CLIENT_LINUX_MAIN_WND_H_
-#define PEERCONNECTION_SAMPLES_CLIENT_LINUX_MAIN_WND_H_
+#ifndef WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_LINUX_MAIN_WND_H_
+#define WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_LINUX_MAIN_WND_H_
+
+#include <string>
#include "webrtc/examples/peerconnection/client/main_wnd.h"
#include "webrtc/examples/peerconnection/client/peer_connection_client.h"
@@ -115,4 +117,4 @@
int draw_buffer_size_;
};
-#endif // PEERCONNECTION_SAMPLES_CLIENT_LINUX_MAIN_WND_H_
+#endif // WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_LINUX_MAIN_WND_H_