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:
Niels Möller
2019-08-07 16:16:45 +02:00
committed by Commit Bot
parent c2fe547eba
commit 0d210ee2f6
3 changed files with 4 additions and 4 deletions

View File

@ -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(