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}
This commit is contained in:

committed by
Commit Bot

parent
7ef8093f2e
commit
cdebea0f48
@ -84,8 +84,8 @@ class RTC_EXPORT RTCStatsReport : public rtc::RefCountInterface {
|
|||||||
// Removes the stats object from the report, returning ownership of it or null
|
// Removes the stats object from the report, returning ownership of it or null
|
||||||
// if there is no object with |id|.
|
// if there is no object with |id|.
|
||||||
std::unique_ptr<const RTCStats> Take(const std::string& id);
|
std::unique_ptr<const RTCStats> Take(const std::string& id);
|
||||||
// Takes ownership of all the stats in |victim|, leaving it empty.
|
// Takes ownership of all the stats in |other|, leaving it empty.
|
||||||
void TakeMembersFrom(rtc::scoped_refptr<RTCStatsReport> victim);
|
void TakeMembersFrom(rtc::scoped_refptr<RTCStatsReport> other);
|
||||||
|
|
||||||
// Stats iterators. Stats are ordered lexicographically on |RTCStats::id|.
|
// Stats iterators. Stats are ordered lexicographically on |RTCStats::id|.
|
||||||
ConstIterator begin() const;
|
ConstIterator begin() const;
|
||||||
|
@ -98,13 +98,12 @@ std::unique_ptr<const RTCStats> RTCStatsReport::Take(const std::string& id) {
|
|||||||
return stats;
|
return stats;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RTCStatsReport::TakeMembersFrom(
|
void RTCStatsReport::TakeMembersFrom(rtc::scoped_refptr<RTCStatsReport> other) {
|
||||||
rtc::scoped_refptr<RTCStatsReport> victim) {
|
for (StatsMap::iterator it = other->stats_.begin(); it != other->stats_.end();
|
||||||
for (StatsMap::iterator it = victim->stats_.begin();
|
++it) {
|
||||||
it != victim->stats_.end(); ++it) {
|
|
||||||
AddStats(std::unique_ptr<const RTCStats>(it->second.release()));
|
AddStats(std::unique_ptr<const RTCStats>(it->second.release()));
|
||||||
}
|
}
|
||||||
victim->stats_.clear();
|
other->stats_.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
RTCStatsReport::ConstIterator RTCStatsReport::begin() const {
|
RTCStatsReport::ConstIterator RTCStatsReport::begin() const {
|
||||||
|
Reference in New Issue
Block a user