stats: s/victim/other
BUG=webrtc:11680
Change-Id: I3bcfdd71647ccf923a19777059dc48ec93581143
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187358
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#32370}
diff --git a/api/stats/rtc_stats_report.h b/api/stats/rtc_stats_report.h
index dc15937..94bd813 100644
--- a/api/stats/rtc_stats_report.h
+++ b/api/stats/rtc_stats_report.h
@@ -84,8 +84,8 @@
// Removes the stats object from the report, returning ownership of it or null
// if there is no object with |id|.
std::unique_ptr<const RTCStats> Take(const std::string& id);
- // Takes ownership of all the stats in |victim|, leaving it empty.
- void TakeMembersFrom(rtc::scoped_refptr<RTCStatsReport> victim);
+ // Takes ownership of all the stats in |other|, leaving it empty.
+ void TakeMembersFrom(rtc::scoped_refptr<RTCStatsReport> other);
// Stats iterators. Stats are ordered lexicographically on |RTCStats::id|.
ConstIterator begin() const;
diff --git a/stats/rtc_stats_report.cc b/stats/rtc_stats_report.cc
index a56d30d..d29d819 100644
--- a/stats/rtc_stats_report.cc
+++ b/stats/rtc_stats_report.cc
@@ -98,13 +98,12 @@
return stats;
}
-void RTCStatsReport::TakeMembersFrom(
- rtc::scoped_refptr<RTCStatsReport> victim) {
- for (StatsMap::iterator it = victim->stats_.begin();
- it != victim->stats_.end(); ++it) {
+void RTCStatsReport::TakeMembersFrom(rtc::scoped_refptr<RTCStatsReport> other) {
+ for (StatsMap::iterator it = other->stats_.begin(); it != other->stats_.end();
+ ++it) {
AddStats(std::unique_ptr<const RTCStats>(it->second.release()));
}
- victim->stats_.clear();
+ other->stats_.clear();
}
RTCStatsReport::ConstIterator RTCStatsReport::begin() const {