Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit cdebea0

Browse files
fippoCommit Bot
authored andcommitted
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 <[email protected]> Commit-Queue: Philipp Hancke <[email protected]> Cr-Commit-Position: refs/heads/master@{#32370}
1 parent 7ef8093 commit cdebea0

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

api/stats/rtc_stats_report.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ class RTC_EXPORT RTCStatsReport : public rtc::RefCountInterface {
8484
// Removes the stats object from the report, returning ownership of it or null
8585
// if there is no object with |id|.
8686
std::unique_ptr<const RTCStats> Take(const std::string& id);
87-
// Takes ownership of all the stats in |victim|, leaving it empty.
88-
void TakeMembersFrom(rtc::scoped_refptr<RTCStatsReport> victim);
87+
// Takes ownership of all the stats in |other|, leaving it empty.
88+
void TakeMembersFrom(rtc::scoped_refptr<RTCStatsReport> other);
8989

9090
// Stats iterators. Stats are ordered lexicographically on |RTCStats::id|.
9191
ConstIterator begin() const;

stats/rtc_stats_report.cc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,12 @@ std::unique_ptr<const RTCStats> RTCStatsReport::Take(const std::string& id) {
9898
return stats;
9999
}
100100

101-
void RTCStatsReport::TakeMembersFrom(
102-
rtc::scoped_refptr<RTCStatsReport> victim) {
103-
for (StatsMap::iterator it = victim->stats_.begin();
104-
it != victim->stats_.end(); ++it) {
101+
void RTCStatsReport::TakeMembersFrom(rtc::scoped_refptr<RTCStatsReport> other) {
102+
for (StatsMap::iterator it = other->stats_.begin(); it != other->stats_.end();
103+
++it) {
105104
AddStats(std::unique_ptr<const RTCStats>(it->second.release()));
106105
}
107-
victim->stats_.clear();
106+
other->stats_.clear();
108107
}
109108

110109
RTCStatsReport::ConstIterator RTCStatsReport::begin() const {

0 commit comments

Comments
 (0)