Change return type of of ReceiveStatistics::Create to unique_ptr.
There are currently three overloads with different number of arguments, and one of those return a raw pointer. This cl changes that to unique_ptr. The transition plan is to update those downstream call sites that currently require a raw pointer to use one of the other overloads. Bug: webrtc:10679 Change-Id: I234605e99c04a59fbe6f478581ed8edd96a9b05a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148447 Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28804}
This commit is contained in:
parent
c2fe547eba
commit
0d210ee2f6
@ -60,8 +60,8 @@ class ReceiveStatistics : public ReceiveStatisticsProvider,
|
||||
public:
|
||||
~ReceiveStatistics() override = default;
|
||||
|
||||
static ReceiveStatistics* Create(Clock* clock) {
|
||||
return Create(clock, nullptr).release();
|
||||
static std::unique_ptr<ReceiveStatistics> Create(Clock* clock) {
|
||||
return Create(clock, nullptr);
|
||||
}
|
||||
|
||||
static std::unique_ptr<ReceiveStatistics> Create(
|
||||
|
||||
@ -131,7 +131,7 @@ class RtpRtcpRtxNackTest : public ::testing::Test {
|
||||
RtpRtcp::Configuration configuration;
|
||||
configuration.audio = false;
|
||||
configuration.clock = &fake_clock;
|
||||
receive_statistics_.reset(ReceiveStatistics::Create(&fake_clock));
|
||||
receive_statistics_ = ReceiveStatistics::Create(&fake_clock);
|
||||
configuration.receive_statistics = receive_statistics_.get();
|
||||
configuration.outgoing_transport = &transport_;
|
||||
configuration.retransmission_rate_limiter = &retransmission_rate_limiter_;
|
||||
|
||||
@ -139,7 +139,7 @@ class RtpVideoStreamReceiverTest : public ::testing::Test {
|
||||
|
||||
void SetUp() {
|
||||
rtp_receive_statistics_ =
|
||||
absl::WrapUnique(ReceiveStatistics::Create(Clock::GetRealTimeClock()));
|
||||
ReceiveStatistics::Create(Clock::GetRealTimeClock());
|
||||
rtp_video_stream_receiver_ = absl::make_unique<RtpVideoStreamReceiver>(
|
||||
Clock::GetRealTimeClock(), &mock_transport_, nullptr, nullptr, &config_,
|
||||
rtp_receive_statistics_.get(), nullptr, process_thread_.get(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user