From 6c70e16a4aa81cdb5a6714e1fd7befc2fbb79d6a Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Fri, 1 Feb 2019 13:17:43 +0100 Subject: [PATCH] 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 Commit-Queue: Mirko Bonadei Cr-Commit-Position: refs/heads/master@{#26512} --- api/stats/rtc_stats_report.h | 2 +- stats/rtc_stats_report.cc | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/api/stats/rtc_stats_report.h b/api/stats/rtc_stats_report.h index 2f5b8765c3..85da197a7f 100644 --- a/api/stats/rtc_stats_report.h +++ b/api/stats/rtc_stats_report.h @@ -34,7 +34,7 @@ class RTC_EXPORT RTCStatsReport : public rtc::RefCountInterface { class ConstIterator { public: - ConstIterator(const ConstIterator&& other); + ConstIterator(ConstIterator&& other); ~ConstIterator(); ConstIterator& operator++(); diff --git a/stats/rtc_stats_report.cc b/stats/rtc_stats_report.cc index bdafd56997..a56d30d3c3 100644 --- a/stats/rtc_stats_report.cc +++ b/stats/rtc_stats_report.cc @@ -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() {}