From 59203c63bb777a3bacec32fb8830fba33540e809 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:35:29 +0200 Subject: Adding upstream version 127.0. Signed-off-by: Daniel Baumann --- third_party/libwebrtc/api/stats/rtc_stats.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'third_party/libwebrtc/api/stats/rtc_stats.h') diff --git a/third_party/libwebrtc/api/stats/rtc_stats.h b/third_party/libwebrtc/api/stats/rtc_stats.h index edd293f5c9..74e7fc4d8e 100644 --- a/third_party/libwebrtc/api/stats/rtc_stats.h +++ b/third_party/libwebrtc/api/stats/rtc_stats.h @@ -20,8 +20,8 @@ #include #include +#include "absl/types/optional.h" #include "api/stats/attribute.h" -#include "api/stats/rtc_stats_member.h" #include "api/units/timestamp.h" #include "rtc_base/checks.h" #include "rtc_base/system/rtc_export.h" @@ -39,8 +39,8 @@ namespace webrtc { // Use the `WEBRTC_RTCSTATS_IMPL` macro when implementing subclasses, see macro // for details. // -// Derived classes list their dictionary attributes (RTCStatsMember to soon -// be replaced by absl::optional) as public fields, allowing the following: +// Derived classes list their dictionary attributes, absl::optional, as +// public fields, allowing the following: // // RTCFooStats foo("fooId", Timestamp::Micros(GetCurrentTime())); // foo.bar = 42; @@ -52,7 +52,7 @@ namespace webrtc { // iteration: // // for (const auto& attribute : foo.Attributes()) { -// printf("%s = %s\n", attribute.name(), attribute.ValueToString().c_str()); +// printf("%s = %s\n", attribute.name(), attribute.ToString().c_str()); // } class RTC_EXPORT RTCStats { public: @@ -73,12 +73,12 @@ class RTC_EXPORT RTCStats { // metrics as viewed via the Attribute wrapper. std::vector Attributes() const; template - Attribute GetAttribute(const RTCStatsMember& stat) const { + Attribute GetAttribute(const absl::optional& stat) const { for (const auto& attribute : Attributes()) { if (!attribute.holds_alternative()) { continue; } - if (absl::get*>(attribute.as_variant()) == + if (absl::get*>(attribute.as_variant()) == &stat) { return attribute; } @@ -136,8 +136,8 @@ class RTC_EXPORT RTCStats { // // RTCFooStats(const std::string& id, Timestamp timestamp); // -// RTCStatsMember foo; -// RTCStatsMember bar; +// absl::optional foo; +// absl::optional bar; // }; // // rtcfoostats.cc: -- cgit v1.2.3