Change some RTC_DCHECKs to RTC_DCHECK_EQ
This makes the error messages more informative. Bug: webrtc:10398 Change-Id: I161aa4bfa53f60d06500d42c883f18add4c58531 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127200 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Ruslan Burakov <kuddai@google.com> Cr-Commit-Position: refs/heads/master@{#27071}
This commit is contained in:
committed by
Commit Bot
parent
4f779c6aec
commit
2594f27bad
@ -331,32 +331,32 @@ bool StatsReport::Value::operator==(const Id& value) const {
|
||||
}
|
||||
|
||||
int StatsReport::Value::int_val() const {
|
||||
RTC_DCHECK(type_ == kInt);
|
||||
RTC_DCHECK_EQ(type_, kInt);
|
||||
return value_.int_;
|
||||
}
|
||||
|
||||
int64_t StatsReport::Value::int64_val() const {
|
||||
RTC_DCHECK(type_ == kInt64);
|
||||
RTC_DCHECK_EQ(type_, kInt64);
|
||||
return value_.int64_;
|
||||
}
|
||||
|
||||
float StatsReport::Value::float_val() const {
|
||||
RTC_DCHECK(type_ == kFloat);
|
||||
RTC_DCHECK_EQ(type_, kFloat);
|
||||
return value_.float_;
|
||||
}
|
||||
|
||||
const char* StatsReport::Value::static_string_val() const {
|
||||
RTC_DCHECK(type_ == kStaticString);
|
||||
RTC_DCHECK_EQ(type_, kStaticString);
|
||||
return value_.static_string_;
|
||||
}
|
||||
|
||||
const std::string& StatsReport::Value::string_val() const {
|
||||
RTC_DCHECK(type_ == kString);
|
||||
RTC_DCHECK_EQ(type_, kString);
|
||||
return *value_.string_;
|
||||
}
|
||||
|
||||
bool StatsReport::Value::bool_val() const {
|
||||
RTC_DCHECK(type_ == kBool);
|
||||
RTC_DCHECK_EQ(type_, kBool);
|
||||
return value_.bool_;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user