From 8f23df51d402f8d84edc4935ef0bc49cd24803f2 Mon Sep 17 00:00:00 2001 From: "pbos@webrtc.org" Date: Wed, 31 Jul 2013 15:16:52 +0000 Subject: [PATCH] Fix some chromium-style warnings in webrtc/modules/remote_bitrate_estimator/ BUG=163 R=pwestin@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1905004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4443 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../remote_bitrate_estimator_single_stream.cc | 12 ++++++------ ...remote_bitrate_estimator_unittest_helper.cc | 9 +++++++++ .../remote_bitrate_estimator_unittest_helper.h | 18 +++++------------- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc index 2221831c38..8eec342836 100644 --- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc +++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc @@ -34,24 +34,24 @@ class RemoteBitrateEstimatorSingleStream : public RemoteBitrateEstimator { // packet size excluding headers. virtual void IncomingPacket(int64_t arrival_time_ms, int payload_size, - const RTPHeader& header); + const RTPHeader& header) OVERRIDE; // Triggers a new estimate calculation. // Implements the Module interface. - virtual int32_t Process(); - virtual int32_t TimeUntilNextProcess(); + virtual int32_t Process() OVERRIDE; + virtual int32_t TimeUntilNextProcess() OVERRIDE; // Set the current round-trip time experienced by the stream. // Implements the StatsObserver interface. - virtual void OnRttUpdate(uint32_t rtt); + virtual void OnRttUpdate(uint32_t rtt) OVERRIDE; // Removes all data for |ssrc|. - virtual void RemoveStream(unsigned int ssrc); + virtual void RemoveStream(unsigned int ssrc) OVERRIDE; // Returns true if a valid estimate exists and sets |bitrate_bps| to the // estimated payload bitrate in bits per second. |ssrcs| is the list of ssrcs // currently being received and of which the bitrate estimate is based upon. virtual bool LatestEstimate(std::vector* ssrcs, - unsigned int* bitrate_bps) const; + unsigned int* bitrate_bps) const OVERRIDE; private: typedef std::map SsrcOveruseDetectorMap; diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc index 28ddc657ff..88ffe061b9 100644 --- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc +++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc @@ -18,6 +18,13 @@ enum { kMtu = 1200 }; namespace testing { +void TestBitrateObserver::OnReceiveBitrateChanged( + const std::vector& ssrcs, + unsigned int bitrate) { + latest_bitrate_ = bitrate; + updated_ = true; +} + RtpStream::RtpStream(int fps, int bitrate_bps, unsigned int ssrc, @@ -187,6 +194,8 @@ RemoteBitrateEstimatorTest::RemoteBitrateEstimatorTest() 1e6, // Capacity. clock_.TimeInMicroseconds())) {} +RemoteBitrateEstimatorTest::~RemoteBitrateEstimatorTest() {} + void RemoteBitrateEstimatorTest::AddDefaultStream() { stream_generator_->AddStream(new testing::RtpStream( 30, // Frames per second. diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.h b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.h index d2f84f4574..64830dab70 100644 --- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.h +++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.h @@ -30,22 +30,13 @@ class TestBitrateObserver : public RemoteBitrateObserver { virtual ~TestBitrateObserver() {} virtual void OnReceiveBitrateChanged(const std::vector& ssrcs, - unsigned int bitrate) { - latest_bitrate_ = bitrate; - updated_ = true; - } + unsigned int bitrate) OVERRIDE; - void Reset() { - updated_ = false; - } + void Reset() { updated_ = false; } - bool updated() const { - return updated_; - } + bool updated() const { return updated_; } - unsigned int latest_bitrate() const { - return latest_bitrate_; - } + unsigned int latest_bitrate() const { return latest_bitrate_; } private: bool updated_; @@ -154,6 +145,7 @@ class StreamGenerator { class RemoteBitrateEstimatorTest : public ::testing::Test { public: RemoteBitrateEstimatorTest(); + virtual ~RemoteBitrateEstimatorTest(); protected: virtual void SetUp() = 0;