Remove more top-level const from parameters in function declarations
This CL removes even more top-level const from parameters in function
declarations. This change is safe because top-level const in function
declarations (not function definitions) are ignored by the compiler
and so change is just a no-op cleanup.
Bug: webrtc:13610
Change-Id: Icf6868c27b1fdb9d9915b3a7020eb34bdcf07a09
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249989
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35866}
diff --git a/call/video_send_stream.h b/call/video_send_stream.h
index f899a73..356d8c8 100644
--- a/call/video_send_stream.h
+++ b/call/video_send_stream.h
@@ -208,8 +208,7 @@
// Note: This starts stream activity if it is inactive and one of the layers
// is active. This stops stream activity if it is active and all layers are
// inactive.
- virtual void UpdateActiveSimulcastLayers(
- const std::vector<bool> active_layers) = 0;
+ virtual void UpdateActiveSimulcastLayers(std::vector<bool> active_layers) = 0;
// Starts stream activity.
// When a stream is active, it can receive, process and deliver packets.
diff --git a/logging/rtc_event_log/events/fixed_length_encoding_parameters_v3.h b/logging/rtc_event_log/events/fixed_length_encoding_parameters_v3.h
index 59d633c..666fae1 100644
--- a/logging/rtc_event_log/events/fixed_length_encoding_parameters_v3.h
+++ b/logging/rtc_event_log/events/fixed_length_encoding_parameters_v3.h
@@ -33,7 +33,7 @@
static FixedLengthEncodingParametersV3 CalculateParameters(
uint64_t base,
- const rtc::ArrayView<const uint64_t> values,
+ rtc::ArrayView<const uint64_t> values,
uint64_t value_bit_width,
bool values_optional);
static absl::optional<FixedLengthEncodingParametersV3> ParseDeltaHeader(
diff --git a/media/engine/fake_webrtc_call.h b/media/engine/fake_webrtc_call.h
index e732379..b84c385 100644
--- a/media/engine/fake_webrtc_call.h
+++ b/media/engine/fake_webrtc_call.h
@@ -193,8 +193,7 @@
void OnFrame(const webrtc::VideoFrame& frame) override;
// webrtc::VideoSendStream implementation.
- void UpdateActiveSimulcastLayers(
- const std::vector<bool> active_layers) override;
+ void UpdateActiveSimulcastLayers(std::vector<bool> active_layers) override;
void Start() override;
void Stop() override;
bool started() override { return IsSending(); }
diff --git a/modules/audio_coding/codecs/isac/main/source/arith_routines.h b/modules/audio_coding/codecs/isac/main/source/arith_routines.h
index 6e7ea1d..3f9f6de 100644
--- a/modules/audio_coding/codecs/isac/main/source/arith_routines.h
+++ b/modules/audio_coding/codecs/isac/main/source/arith_routines.h
@@ -24,9 +24,9 @@
Bitstr* streamdata, /* in-/output struct containing bitstream */
int16_t* dataQ7, /* input: data vector */
const uint16_t*
- env, /* input: side info vector defining the width of the pdf */
- const int N, /* input: data vector length */
- const int16_t isSWB12kHz); /* if the codec is working in 12kHz bandwidth */
+ env, /* input: side info vector defining the width of the pdf */
+ int N, /* input: data vector length */
+ int16_t isSWB12kHz); /* if the codec is working in 12kHz bandwidth */
/* returns the number of bytes in the stream */
int WebRtcIsac_EncTerminate(
@@ -38,15 +38,15 @@
Bitstr* streamdata, /* in-/output struct containing bitstream */
const uint16_t*
env, /* input: side info vector defining the width of the pdf */
- const int16_t* dither, /* input: dither vector */
- const int N, /* input: data vector length */
- const int16_t isSWB12kHz); /* if the codec is working in 12kHz bandwidth */
+ const int16_t* dither, /* input: dither vector */
+ int N, /* input: data vector length */
+ int16_t isSWB12kHz); /* if the codec is working in 12kHz bandwidth */
void WebRtcIsac_EncHistMulti(
Bitstr* streamdata, /* in-/output struct containing bitstream */
const int* data, /* input: data vector */
const uint16_t* const* cdf, /* input: array of cdf arrays */
- const int N); /* input: data vector length */
+ int N); /* input: data vector length */
int WebRtcIsac_DecHistBisectMulti(
int* data, /* output: data vector */
@@ -54,7 +54,7 @@
const uint16_t* const* cdf, /* input: array of cdf arrays */
const uint16_t*
cdf_size, /* input: array of cdf table sizes+1 (power of two: 2^k) */
- const int N); /* input: data vector length */
+ int N); /* input: data vector length */
int WebRtcIsac_DecHistOneStepMulti(
int* data, /* output: data vector */
@@ -62,6 +62,6 @@
const uint16_t* const* cdf, /* input: array of cdf arrays */
const uint16_t*
init_index, /* input: vector of initial cdf table search entries */
- const int N); /* input: data vector length */
+ int N); /* input: data vector length */
#endif /* MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_ARITH_ROUTINES_H_ */
diff --git a/modules/audio_device/include/audio_device_data_observer.h b/modules/audio_device/include/audio_device_data_observer.h
index 0e93202..36dc45f 100644
--- a/modules/audio_device/include/audio_device_data_observer.h
+++ b/modules/audio_device/include/audio_device_data_observer.h
@@ -29,7 +29,7 @@
size_t num_samples,
size_t bytes_per_sample,
size_t num_channels,
- const uint32_t samples_per_sec) = 0;
+ uint32_t samples_per_sec) = 0;
virtual void OnRenderData(const void* audio_samples,
size_t num_samples,
diff --git a/modules/audio_processing/aec3/alignment_mixer.h b/modules/audio_processing/aec3/alignment_mixer.h
index 682aec9..aa1830f 100644
--- a/modules/audio_processing/aec3/alignment_mixer.h
+++ b/modules/audio_processing/aec3/alignment_mixer.h
@@ -49,7 +49,7 @@
int selected_channel_ = 0;
size_t block_counter_ = 0;
- void Downmix(const rtc::ArrayView<const std::vector<float>> x,
+ void Downmix(rtc::ArrayView<const std::vector<float>> x,
rtc::ArrayView<float, kBlockSize> y) const;
int SelectChannel(rtc::ArrayView<const std::vector<float>> x);
};
diff --git a/modules/audio_processing/aecm/aecm_core.h b/modules/audio_processing/aecm/aecm_core.h
index 2ee1129..3de4931 100644
--- a/modules/audio_processing/aecm/aecm_core.h
+++ b/modules/audio_processing/aecm/aecm_core.h
@@ -339,8 +339,8 @@
//
void WebRtcAecm_CalcEnergies(AecmCore* aecm,
const uint16_t* far_spectrum,
- const int16_t far_q,
- const uint32_t nearEner,
+ int16_t far_q,
+ uint32_t nearEner,
int32_t* echoEst);
///////////////////////////////////////////////////////////////////////////////
diff --git a/modules/video_capture/windows/device_info_ds.h b/modules/video_capture/windows/device_info_ds.h
index 2fda325..1b52645 100644
--- a/modules/video_capture/windows/device_info_ds.h
+++ b/modules/video_capture/windows/device_info_ds.h
@@ -69,7 +69,7 @@
uint32_t productUniqueIdUTF8Length = 0);
int32_t GetWindowsCapability(
- const int32_t capabilityIndex,
+ int32_t capabilityIndex,
VideoCaptureCapabilityWindows& windowsCapability);
static void GetProductId(const char* devicePath,
diff --git a/modules/video_coding/codecs/test/videoprocessor.h b/modules/video_coding/codecs/test/videoprocessor.h
index 595a4f1..217137c 100644
--- a/modules/video_coding/codecs/test/videoprocessor.h
+++ b/modules/video_coding/codecs/test/videoprocessor.h
@@ -185,7 +185,7 @@
// lower layer frames, we merge and store the layer frames in this method.
const webrtc::EncodedImage* BuildAndStoreSuperframe(
const EncodedImage& encoded_image,
- const VideoCodecType codec,
+ VideoCodecType codec,
size_t frame_number,
size_t simulcast_svc_idx,
bool inter_layer_predicted) RTC_RUN_ON(sequence_checker_);
diff --git a/modules/video_coding/fec_controller_default.h b/modules/video_coding/fec_controller_default.h
index cca1658..a97dea0 100644
--- a/modules/video_coding/fec_controller_default.h
+++ b/modules/video_coding/fec_controller_default.h
@@ -47,9 +47,8 @@
uint8_t fraction_lost,
std::vector<bool> loss_mask_vector,
int64_t round_trip_time_ms) override;
- void UpdateWithEncodedData(
- const size_t encoded_image_length,
- const VideoFrameType encoded_image_frametype) override;
+ void UpdateWithEncodedData(size_t encoded_image_length,
+ VideoFrameType encoded_image_frametype) override;
bool UseLossVectorMask() override;
float GetProtectionOverheadRateThreshold();
diff --git a/sdk/android/native_api/codecs/wrapper.h b/sdk/android/native_api/codecs/wrapper.h
index 2246fd7..0420169 100644
--- a/sdk/android/native_api/codecs/wrapper.h
+++ b/sdk/android/native_api/codecs/wrapper.h
@@ -41,7 +41,7 @@
// of ResolutionBitrateLimits.
std::vector<VideoEncoder::ResolutionBitrateLimits>
JavaToNativeResolutionBitrateLimits(JNIEnv* jni,
- const jobjectArray j_bitrate_limits_array);
+ jobjectArray j_bitrate_limits_array);
} // namespace webrtc
diff --git a/video/video_send_stream.h b/video/video_send_stream.h
index 58a0f98..d1afefa 100644
--- a/video/video_send_stream.h
+++ b/video/video_send_stream.h
@@ -75,8 +75,7 @@
void DeliverRtcp(const uint8_t* packet, size_t length);
// webrtc::VideoSendStream implementation.
- void UpdateActiveSimulcastLayers(
- const std::vector<bool> active_layers) override;
+ void UpdateActiveSimulcastLayers(std::vector<bool> active_layers) override;
void Start() override;
void Stop() override;
bool started() override;