Fix RTCStatsReport::ConstIterator move constructor.

This problem has been originally discovered by clang-tidy while trying
to apply performance-move-const-arg [1] on [2].

[1] - https://clang.llvm.org/extra/clang-tidy/checks/performance-move-const-arg.html
[2] - https://webrtc-review.googlesource.com/c/src/+/120350

Bug: webrtc:10252
Change-Id: I2b0a116f78ca8096a6cf2bc23e2f4b8f372ca04f
Reviewed-on: https://webrtc-review.googlesource.com/c/120815
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26512}
This commit is contained in:
Mirko Bonadei 2019-02-01 13:17:43 +01:00 committed by Commit Bot
parent 4bfbb01e84
commit 6c70e16a4a
2 changed files with 2 additions and 3 deletions

View File

@ -34,7 +34,7 @@ class RTC_EXPORT RTCStatsReport : public rtc::RefCountInterface {
class ConstIterator {
public:
ConstIterator(const ConstIterator&& other);
ConstIterator(ConstIterator&& other);
~ConstIterator();
ConstIterator& operator++();

View File

@ -23,8 +23,7 @@ RTCStatsReport::ConstIterator::ConstIterator(
StatsMap::const_iterator it)
: report_(report), it_(it) {}
RTCStatsReport::ConstIterator::ConstIterator(const ConstIterator&& other)
: report_(std::move(other.report_)), it_(std::move(other.it_)) {}
RTCStatsReport::ConstIterator::ConstIterator(ConstIterator&& other) = default;
RTCStatsReport::ConstIterator::~ConstIterator() {}