diff --git a/system_wrappers/include/metrics.h b/system_wrappers/include/metrics.h index 8e0f084934..e540b7064b 100644 --- a/system_wrappers/include/metrics.h +++ b/system_wrappers/include/metrics.h @@ -163,7 +163,7 @@ void NoOp(const Ts&...) {} RTC_HISTOGRAM_ENUMERATION_SPARSE(name, sample, 2) // Histogram for enumerators (evenly spaced buckets). -// |boundary| should be above the max enumerator sample. +// `boundary` should be above the max enumerator sample. // // TODO(qingsi): Refactor the default implementation given by RtcHistogram, // which is already sparse, and remove the boundary argument from the macro. @@ -181,7 +181,7 @@ void NoOp(const Ts&...) {} RTC_HISTOGRAM_ENUMERATION(name, sample, 2) // Histogram for enumerators (evenly spaced buckets). -// |boundary| should be above the max enumerator sample. +// `boundary` should be above the max enumerator sample. #define RTC_HISTOGRAM_ENUMERATION(name, sample, boundary) \ RTC_HISTOGRAM_COMMON_BLOCK_SLOW( \ name, sample, \ @@ -223,7 +223,7 @@ void NoOp(const Ts&...) {} // Helper macros. // Macros for calling a histogram with varying name (e.g. when using a metric // in different modes such as real-time vs screenshare). Fast, because pointer -// is cached. |index| should be different for different names. Allowed |index| +// is cached. `index` should be different for different names. Allowed `index` // values are 0, 1, and 2. #define RTC_HISTOGRAMS_COUNTS_100(index, name, sample) \ RTC_HISTOGRAMS_COMMON(index, name, sample, \ @@ -383,16 +383,16 @@ Histogram* HistogramFactoryGetCountsLinear(const std::string& name, int bucket_count); // Get histogram for enumerators. -// |boundary| should be above the max enumerator sample. +// `boundary` should be above the max enumerator sample. Histogram* HistogramFactoryGetEnumeration(const std::string& name, int boundary); // Get sparse histogram for enumerators. -// |boundary| should be above the max enumerator sample. +// `boundary` should be above the max enumerator sample. Histogram* SparseHistogramFactoryGetEnumeration(const std::string& name, int boundary); -// Function for adding a |sample| to a histogram. +// Function for adding a `sample` to a histogram. void HistogramAdd(Histogram* histogram_pointer, int sample); struct SampleInfo { @@ -419,7 +419,7 @@ void GetAndReset( // Clears all samples. void Reset(); -// Returns the number of times the |sample| has been added to the histogram. +// Returns the number of times the `sample` has been added to the histogram. int NumEvents(const std::string& name, int sample); // Returns the total number of added samples to the histogram. diff --git a/system_wrappers/include/ntp_time.h b/system_wrappers/include/ntp_time.h index 332f8f4624..cb58018bfa 100644 --- a/system_wrappers/include/ntp_time.h +++ b/system_wrappers/include/ntp_time.h @@ -62,7 +62,7 @@ inline bool operator!=(const NtpTime& n1, const NtpTime& n2) { return !(n1 == n2); } -// Converts |int64_t| milliseconds to Q32.32-formatted fixed-point seconds. +// Converts `int64_t` milliseconds to Q32.32-formatted fixed-point seconds. // Performs clamping if the result overflows or underflows. inline int64_t Int64MsToQ32x32(int64_t milliseconds) { // TODO(bugs.webrtc.org/10893): Change to use |rtc::saturated_cast| once the @@ -85,7 +85,7 @@ inline int64_t Int64MsToQ32x32(int64_t milliseconds) { return rtc::dchecked_cast(result); } -// Converts |int64_t| milliseconds to UQ32.32-formatted fixed-point seconds. +// Converts `int64_t` milliseconds to UQ32.32-formatted fixed-point seconds. // Performs clamping if the result overflows or underflows. inline uint64_t Int64MsToUQ32x32(int64_t milliseconds) { // TODO(bugs.webrtc.org/10893): Change to use |rtc::saturated_cast| once the @@ -108,13 +108,13 @@ inline uint64_t Int64MsToUQ32x32(int64_t milliseconds) { return rtc::dchecked_cast(result); } -// Converts Q32.32-formatted fixed-point seconds to |int64_t| milliseconds. +// Converts Q32.32-formatted fixed-point seconds to `int64_t` milliseconds. inline int64_t Q32x32ToInt64Ms(int64_t q32x32) { return rtc::dchecked_cast( std::round(q32x32 * (1000.0 / NtpTime::kFractionsPerSecond))); } -// Converts UQ32.32-formatted fixed-point seconds to |int64_t| milliseconds. +// Converts UQ32.32-formatted fixed-point seconds to `int64_t` milliseconds. inline int64_t UQ32x32ToInt64Ms(uint64_t q32x32) { return rtc::dchecked_cast( std::round(q32x32 * (1000.0 / NtpTime::kFractionsPerSecond))); diff --git a/system_wrappers/include/rtp_to_ntp_estimator.h b/system_wrappers/include/rtp_to_ntp_estimator.h index d5c50a3f32..175063351a 100644 --- a/system_wrappers/include/rtp_to_ntp_estimator.h +++ b/system_wrappers/include/rtp_to_ntp_estimator.h @@ -41,7 +41,7 @@ class RtpToNtpEstimator { int64_t unwrapped_rtp_timestamp; }; - // Estimated parameters from RTP and NTP timestamp pairs in |measurements_|. + // Estimated parameters from RTP and NTP timestamp pairs in `measurements_`. struct Parameters { Parameters() : frequency_khz(0.0), offset_ms(0.0) {} @@ -53,7 +53,7 @@ class RtpToNtpEstimator { }; // Updates measurements with RTP/NTP timestamp pair from a RTCP sender report. - // |new_rtcp_sr| is set to true if a new report is added. + // `new_rtcp_sr` is set to true if a new report is added. bool UpdateMeasurements(uint32_t ntp_secs, uint32_t ntp_frac, uint32_t rtp_timestamp, diff --git a/system_wrappers/source/clock.cc b/system_wrappers/source/clock.cc index 77c1d36327..1764bf2cd2 100644 --- a/system_wrappers/source/clock.cc +++ b/system_wrappers/source/clock.cc @@ -94,8 +94,8 @@ class RealTimeClock : public Clock { } NtpTime ConvertTimestampToNtpTime(Timestamp timestamp) override { - // This method does not check |use_system_independent_ntp_time_| because - // all callers never used the old behavior of |CurrentNtpTime|. + // This method does not check `use_system_independent_ntp_time_` because + // all callers never used the old behavior of `CurrentNtpTime`. return TimeMicrosToNtp(timestamp.us()); } diff --git a/system_wrappers/source/cpu_features.cc b/system_wrappers/source/cpu_features.cc index 0f81212894..23e0629851 100644 --- a/system_wrappers/source/cpu_features.cc +++ b/system_wrappers/source/cpu_features.cc @@ -30,7 +30,7 @@ int GetCPUInfoNoASM(CPUFeature feature) { #if defined(WEBRTC_ENABLE_AVX2) // xgetbv returns the value of an Intel Extended Control Register (XCR). -// Currently only XCR0 is defined by Intel so |xcr| should always be zero. +// Currently only XCR0 is defined by Intel so `xcr` should always be zero. static uint64_t xgetbv(uint32_t xcr) { #if defined(_MSC_VER) return _xgetbv(xcr); diff --git a/system_wrappers/source/metrics.cc b/system_wrappers/source/metrics.cc index d42833643d..b14eef4618 100644 --- a/system_wrappers/source/metrics.cc +++ b/system_wrappers/source/metrics.cc @@ -265,7 +265,7 @@ Histogram* SparseHistogramFactoryGetEnumeration(const std::string& name, return HistogramFactoryGetEnumeration(name, boundary); } -// Fast path. Adds |sample| to cached |histogram_pointer|. +// Fast path. Adds `sample` to cached `histogram_pointer`. void HistogramAdd(Histogram* histogram_pointer, int sample) { RtcHistogram* ptr = reinterpret_cast(histogram_pointer); ptr->Add(sample); diff --git a/system_wrappers/source/rtp_to_ntp_estimator.cc b/system_wrappers/source/rtp_to_ntp_estimator.cc index b26115f703..d0b0ad447f 100644 --- a/system_wrappers/source/rtp_to_ntp_estimator.cc +++ b/system_wrappers/source/rtp_to_ntp_estimator.cc @@ -88,7 +88,7 @@ RtpToNtpEstimator::RtcpMeasurement::RtcpMeasurement(uint32_t ntp_secs, bool RtpToNtpEstimator::RtcpMeasurement::IsEqual( const RtcpMeasurement& other) const { // Use || since two equal timestamps will result in zero frequency and in - // RtpToNtpMs, |rtp_timestamp_ms| is estimated by dividing by the frequency. + // RtpToNtpMs, `rtp_timestamp_ms` is estimated by dividing by the frequency. return (ntp_time == other.ntp_time) || (unwrapped_rtp_timestamp == other.unwrapped_rtp_timestamp); }