mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 05:40:42 +01:00
GCC: Avoid symbol clash in RenderBuffer
GCC fails to resolve getter for RenderBuffer::Block() because its return type has the same name with the getter method. Rename getter method with the prefix "Get" as guided in the https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/blink-c++.md#Precede-setters-with-the-word-Set_use-bare-words-for-getters "If a getter’s name collides with a type name, prefix it with “Get”." Bug: chromium:819294, webrtc:14089 Change-Id: Ieaa3af27415eb8c39806aa8480897b47fd07baa8 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263420 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36982}
This commit is contained in:
parent
794c54faf0
commit
1e8bb67295
7 changed files with 7 additions and 6 deletions
1
AUTHORS
1
AUTHORS
|
@ -138,6 +138,7 @@ Google Inc. <*@google.com>
|
|||
Highfive, Inc. <*@highfive.com>
|
||||
HyperConnect Inc. <*@hpcnt.com>
|
||||
Intel Corporation <*@intel.com>
|
||||
LG Electronics, Inc. <*@lge.com>
|
||||
Life On Air Inc. <*@lifeonair.com>
|
||||
Microsoft Corporation <*@microsoft.com>
|
||||
MIPS Technologies <*@mips.com>
|
||||
|
|
|
@ -207,7 +207,7 @@ void AecState::Update(
|
|||
}
|
||||
|
||||
const Block& aligned_render_block =
|
||||
render_buffer.Block(-delay_state_.MinDirectPathFilterDelay());
|
||||
render_buffer.GetBlock(-delay_state_.MinDirectPathFilterDelay());
|
||||
|
||||
// Update render counters.
|
||||
bool active_render = false;
|
||||
|
|
|
@ -321,7 +321,7 @@ TEST(BlockProcessor, ExternalDelayAppliedCorrectlyWithInitialCaptureCalls) {
|
|||
const absl::optional<DelayEstimate>& /*external_delay*/,
|
||||
RenderBuffer* render_buffer, Block* /*linear_output*/,
|
||||
Block* capture) {
|
||||
const auto& render = render_buffer->Block(0);
|
||||
const auto& render = render_buffer->GetBlock(0);
|
||||
const auto render_view = render.View(/*band=*/0, /*channel=*/0);
|
||||
const auto capture_view = capture->View(/*band=*/0, /*channel=*/0);
|
||||
for (size_t i = 0; i < kBlockSize; ++i) {
|
||||
|
|
|
@ -245,7 +245,7 @@ void EchoRemoverImpl::ProcessCapture(
|
|||
Block* linear_output,
|
||||
Block* capture) {
|
||||
++block_counter_;
|
||||
const Block& x = render_buffer->Block(0);
|
||||
const Block& x = render_buffer->GetBlock(0);
|
||||
Block* y = capture;
|
||||
RTC_DCHECK(render_buffer);
|
||||
RTC_DCHECK(y);
|
||||
|
|
|
@ -131,7 +131,7 @@ void FilterAnalyzer::AnalyzeRegion(
|
|||
|
||||
st_ch.consistent_estimate = st_ch.consistent_filter_detector.Detect(
|
||||
h_highpass_[ch], region_,
|
||||
render_buffer.Block(-filter_delays_blocks_[ch]), st_ch.peak_index,
|
||||
render_buffer.GetBlock(-filter_delays_blocks_[ch]), st_ch.peak_index,
|
||||
filter_delays_blocks_[ch]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ class RenderBuffer {
|
|||
~RenderBuffer();
|
||||
|
||||
// Get a block.
|
||||
const Block& Block(int buffer_offset_blocks) const {
|
||||
const Block& GetBlock(int buffer_offset_blocks) const {
|
||||
int position =
|
||||
block_buffer_->OffsetIndex(block_buffer_->read, buffer_offset_blocks);
|
||||
return block_buffer_->buffer[position];
|
||||
|
|
|
@ -66,7 +66,7 @@ void IdentifyStrongNarrowBandComponent(const RenderBuffer& render_buffer,
|
|||
*narrow_peak_band = absl::nullopt;
|
||||
}
|
||||
|
||||
const Block& x_latest = render_buffer.Block(0);
|
||||
const Block& x_latest = render_buffer.GetBlock(0);
|
||||
float max_peak_level = 0.f;
|
||||
for (int channel = 0; channel < x_latest.NumChannels(); ++channel) {
|
||||
rtc::ArrayView<const float, kFftLengthBy2Plus1> X2_latest =
|
||||
|
|
Loading…
Reference in a new issue