Enable cpplint for webrtc/modules/pacing and fix all uncovered cpplint errors.

This CL enableds cpplint for webrtc/modules/pacing.

BUG=webrtc:5460
NOTRY=true

TESTED=Fixed issues reported by:
find webrtc/modules/pacing -type f -name *.cc -o -name *.h | xargs cpplint.py
followed by 'git cl presubmit'.

Review URL: https://codereview.webrtc.org/1674423002

Cr-Commit-Position: refs/heads/master@{#11531}
This commit is contained in:
jbauch
2016-02-08 23:18:25 -08:00
committed by Commit bot
parent cd0e4751b2
commit d2a22960c3
5 changed files with 9 additions and 5 deletions

View File

@ -21,6 +21,7 @@ CPPLINT_DIRS = [
'webrtc/common_video',
'webrtc/examples',
'webrtc/modules/bitrate_controller',
'webrtc/modules/pacing',
'webrtc/modules/remote_bitrate_estimator',
'webrtc/modules/rtp_rtcp',
'webrtc/modules/video_coding',

View File

@ -11,10 +11,10 @@
#ifndef WEBRTC_MODULES_PACING_MOCK_MOCK_PACED_SENDER_H_
#define WEBRTC_MODULES_PACING_MOCK_MOCK_PACED_SENDER_H_
#include "testing/gmock/include/gmock/gmock.h"
#include <vector>
#include "testing/gmock/include/gmock/gmock.h"
#include "webrtc/modules/pacing/paced_sender.h"
#include "webrtc/system_wrappers/include/clock.h"

View File

@ -10,9 +10,11 @@
#include "webrtc/modules/pacing/paced_sender.h"
#include <algorithm>
#include <map>
#include <queue>
#include <set>
#include <vector>
#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"

View File

@ -288,7 +288,7 @@ TEST_F(PacedSenderTest, PaceQueuedPacketsWithDuplicates) {
TimeToSendPacket(ssrc, queued_sequence_number++, _, false))
.Times(1)
.WillRepeatedly(Return(true));
}
}
EXPECT_EQ(0, send_bucket_->TimeUntilNextProcess());
EXPECT_EQ(0, send_bucket_->Process());
}
@ -422,7 +422,8 @@ TEST_F(PacedSenderTest, VerifyAverageBitrateVaryingMediaPayload) {
int64_t start_time = clock_.TimeInMilliseconds();
size_t media_bytes = 0;
while (clock_.TimeInMilliseconds() - start_time < kBitrateWindow) {
size_t media_payload = rand() % 100 + 200; // [200, 300] bytes.
int rand_value = rand(); // NOLINT (rand_r instead of rand)
size_t media_payload = rand_value % 100 + 200; // [200, 300] bytes.
send_bucket_->InsertPacket(PacedSender::kNormalPriority, ssrc,
sequence_number++, capture_time_ms,
media_payload, false);

View File

@ -40,7 +40,7 @@ bool SendFeedback(rtcp::TransportFeedback* packet,
}
return false;
}
}
} // namespace
PacketRouter::PacketRouter() : transport_seq_(0) {
pacer_thread_checker_.DetachFromThread();