Use backticks not vertical bars to denote variables in comments for /system_wrappers

Bug: webrtc:12338
Change-Id: Ibd6a1b11fae9927be6f3122499d8e33ebeb82388
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227026
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34560}
This commit is contained in:
Artem Titov 2021-07-27 12:40:17 +02:00 committed by WebRTC LUCI CQ
parent 00fd3e352a
commit f0671921a1
7 changed files with 18 additions and 18 deletions

View file

@ -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.

View file

@ -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<int64_t>(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<uint64_t>(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<int64_t>(
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<int64_t>(
std::round(q32x32 * (1000.0 / NtpTime::kFractionsPerSecond)));

View file

@ -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,

View file

@ -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());
}

View file

@ -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);

View file

@ -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<RtcHistogram*>(histogram_pointer);
ptr->Add(sample);

View file

@ -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);
}