Add missing method definition for StatsReport::Value::id_val()
Also add a preprocessor definition to avoid redefinition in downstream projects. Bug: webrtc:15241 Change-Id: Ic55d98c3d3a69b9b19195ee78f03af6e38fdd0e2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308601 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Reviewed-by: Jonas Oreland <jonaso@webrtc.org> Commit-Queue: Sameer Vijaykar <samvi@google.com> Cr-Commit-Position: refs/heads/main@{#40289}
This commit is contained in:
parent
36e37c7de9
commit
51b82067ca
@ -362,6 +362,11 @@ bool StatsReport::Value::bool_val() const {
|
||||
return value_.bool_;
|
||||
}
|
||||
|
||||
const StatsReport::Id& StatsReport::Value::id_val() const {
|
||||
RTC_DCHECK_EQ(type_, kId);
|
||||
return *value_.id_;
|
||||
}
|
||||
|
||||
const char* StatsReport::Value::display_name() const {
|
||||
switch (name) {
|
||||
case kStatsValueNameAecDivergentFilterFraction:
|
||||
|
||||
@ -333,6 +333,12 @@ class RTC_EXPORT StatsReport {
|
||||
bool bool_val() const;
|
||||
const Id& id_val() const;
|
||||
|
||||
// TODO(bugs.webrtc.org/15241): remove this definition once downstream
|
||||
// definitions of StatsReport::Value::id_val() have been deleted.
|
||||
#ifndef WEBRTC_DEFINES_STATSREPORT_VALUE_ID_VAL
|
||||
#define WEBRTC_DEFINES_STATSREPORT_VALUE_ID_VAL
|
||||
#endif // WEBRTC_DEFINES_STATSREPORT_VALUE_ID_VAL
|
||||
|
||||
// Returns the string representation of `name`.
|
||||
const char* display_name() const;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user