| Index: webrtc/stats/rtcstatsreport.cc
|
| diff --git a/webrtc/stats/rtcstatsreport.cc b/webrtc/stats/rtcstatsreport.cc
|
| index 3dd6eff39fc43518f7d615cf3c67e5ba7af68913..566aef8772de09d18103123d8a9a17082e523bac 100644
|
| --- a/webrtc/stats/rtcstatsreport.cc
|
| +++ b/webrtc/stats/rtcstatsreport.cc
|
| @@ -69,9 +69,12 @@ RTCStatsReport::RTCStatsReport(int64_t timestamp_us)
|
| RTCStatsReport::~RTCStatsReport() {
|
| }
|
|
|
| -bool RTCStatsReport::AddStats(std::unique_ptr<const RTCStats> stats) {
|
| - return !stats_.insert(std::make_pair(std::string(stats->id()),
|
| - std::move(stats))).second;
|
| +void RTCStatsReport::AddStats(std::unique_ptr<const RTCStats> stats) {
|
| + auto result = stats_.insert(std::make_pair(std::string(stats->id()),
|
| + std::move(stats)));
|
| + RTC_DCHECK(result.second) <<
|
| + "A stats object with ID " << result.first->second->id() << " is already "
|
| + "present in this stats report.";
|
| }
|
|
|
| const RTCStats* RTCStatsReport::Get(const std::string& id) const {
|
|
|