From 26622d3ff8dcbddd6027a148a4be42d7c0de60e1 Mon Sep 17 00:00:00 2001 From: agrieve Date: Tue, 8 Aug 2017 10:48:15 -0700 Subject: [PATCH] Audit of kConstants missing the const qualifier Found via supersize query: size_info.symbols.WhereFullNameMatches(r'\bk[A-Z]').WhereInSection('d') This moves 90 symbols from .data -> .data.rel.ro (5.50kb) BUG=chromium:747064 Review-Url: https://codereview.webrtc.org/2986163002 Cr-Commit-Position: refs/heads/master@{#19274} --- webrtc/api/stats/rtcstats_objects.h | 40 ++++---- webrtc/config.cc | 18 ++-- webrtc/config.h | 18 ++-- webrtc/media/engine/webrtcmediaengine.cc | 4 +- .../isac/fix/source/arith_routines_hist.c | 6 +- .../codecs/isac/fix/source/arith_routins.h | 6 +- .../codecs/isac/fix/source/entropy_coding.c | 4 +- .../codecs/isac/main/source/arith_routines.h | 6 +- .../isac/main/source/arith_routines_hist.c | 6 +- .../codecs/isac/main/source/entropy_coding.c | 4 +- .../noise_spectrum_estimator.cc | 2 +- webrtc/modules/pacing/alr_detector.cc | 4 +- webrtc/modules/pacing/alr_detector.h | 4 +- .../remote_bitrate_estimator/bwe_defines.cc | 2 +- .../include/bwe_defines.h | 2 +- .../source/fec_private_tables_bursty.h | 26 ++--- .../source/fec_private_tables_random.h | 98 +++++++++---------- .../forward_error_correction_internal.cc | 3 +- .../forward_error_correction_internal.h | 6 +- webrtc/rtc_base/rtccertificategenerator.cc | 2 +- webrtc/rtc_base/sslroots.h | 2 +- webrtc/stats/rtcstats_objects.cc | 40 ++++---- 22 files changed, 152 insertions(+), 151 deletions(-) diff --git a/webrtc/api/stats/rtcstats_objects.h b/webrtc/api/stats/rtcstats_objects.h index d73c3b8327..071a7fb205 100644 --- a/webrtc/api/stats/rtcstats_objects.h +++ b/webrtc/api/stats/rtcstats_objects.h @@ -20,44 +20,44 @@ namespace webrtc { // https://w3c.github.io/webrtc-pc/#idl-def-rtcdatachannelstate struct RTCDataChannelState { - static const char* kConnecting; - static const char* kOpen; - static const char* kClosing; - static const char* kClosed; + static const char* const kConnecting; + static const char* const kOpen; + static const char* const kClosing; + static const char* const kClosed; }; // https://w3c.github.io/webrtc-stats/#dom-rtcstatsicecandidatepairstate struct RTCStatsIceCandidatePairState { - static const char* kFrozen; - static const char* kWaiting; - static const char* kInProgress; - static const char* kFailed; - static const char* kSucceeded; + static const char* const kFrozen; + static const char* const kWaiting; + static const char* const kInProgress; + static const char* const kFailed; + static const char* const kSucceeded; }; // https://w3c.github.io/webrtc-pc/#rtcicecandidatetype-enum struct RTCIceCandidateType { - static const char* kHost; - static const char* kSrflx; - static const char* kPrflx; - static const char* kRelay; + static const char* const kHost; + static const char* const kSrflx; + static const char* const kPrflx; + static const char* const kRelay; }; // https://w3c.github.io/webrtc-pc/#idl-def-rtcdtlstransportstate struct RTCDtlsTransportState { - static const char* kNew; - static const char* kConnecting; - static const char* kConnected; - static const char* kClosed; - static const char* kFailed; + static const char* const kNew; + static const char* const kConnecting; + static const char* const kConnected; + static const char* const kClosed; + static const char* const kFailed; }; // |RTCMediaStreamTrackStats::kind| is not an enum in the spec but the only // valid values are "audio" and "video". // https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-kind struct RTCMediaStreamTrackKind { - static const char* kAudio; - static const char* kVideo; + static const char* const kAudio; + static const char* const kVideo; }; // https://w3c.github.io/webrtc-stats/#certificatestats-dict* diff --git a/webrtc/config.cc b/webrtc/config.cc index 96308da568..19a9a96079 100644 --- a/webrtc/config.cc +++ b/webrtc/config.cc @@ -49,22 +49,22 @@ std::string RtpExtension::ToString() const { return ss.str(); } -const char* RtpExtension::kAudioLevelUri = +const char RtpExtension::kAudioLevelUri[] = "urn:ietf:params:rtp-hdrext:ssrc-audio-level"; const int RtpExtension::kAudioLevelDefaultId = 1; -const char* RtpExtension::kTimestampOffsetUri = +const char RtpExtension::kTimestampOffsetUri[] = "urn:ietf:params:rtp-hdrext:toffset"; const int RtpExtension::kTimestampOffsetDefaultId = 2; -const char* RtpExtension::kAbsSendTimeUri = +const char RtpExtension::kAbsSendTimeUri[] = "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time"; const int RtpExtension::kAbsSendTimeDefaultId = 3; -const char* RtpExtension::kVideoRotationUri = "urn:3gpp:video-orientation"; +const char RtpExtension::kVideoRotationUri[] = "urn:3gpp:video-orientation"; const int RtpExtension::kVideoRotationDefaultId = 4; -const char* RtpExtension::kTransportSequenceNumberUri = +const char RtpExtension::kTransportSequenceNumberUri[] = "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01"; const int RtpExtension::kTransportSequenceNumberDefaultId = 5; @@ -72,19 +72,19 @@ const int RtpExtension::kTransportSequenceNumberDefaultId = 5; // on frames as per the current needs. For example, a gaming application // has very different needs on end-to-end delay compared to a video-conference // application. -const char* RtpExtension::kPlayoutDelayUri = +const char RtpExtension::kPlayoutDelayUri[] = "http://www.webrtc.org/experiments/rtp-hdrext/playout-delay"; const int RtpExtension::kPlayoutDelayDefaultId = 6; -const char* RtpExtension::kVideoContentTypeUri = +const char RtpExtension::kVideoContentTypeUri[] = "http://www.webrtc.org/experiments/rtp-hdrext/video-content-type"; const int RtpExtension::kVideoContentTypeDefaultId = 7; -const char* RtpExtension::kVideoTimingUri = +const char RtpExtension::kVideoTimingUri[] = "http://www.webrtc.org/experiments/rtp-hdrext/video-timing"; const int RtpExtension::kVideoTimingDefaultId = 8; -const char* RtpExtension::kEncryptHeaderExtensionsUri = +const char RtpExtension::kEncryptHeaderExtensionsUri[] = "urn:ietf:params:rtp-hdrext:encrypt"; const int RtpExtension::kMinId = 1; diff --git a/webrtc/config.h b/webrtc/config.h index 13b2f14268..962e0f2fb9 100644 --- a/webrtc/config.h +++ b/webrtc/config.h @@ -85,44 +85,44 @@ struct RtpExtension { // Header extension for audio levels, as defined in: // http://tools.ietf.org/html/draft-ietf-avtext-client-to-mixer-audio-level-03 - static const char* kAudioLevelUri; + static const char kAudioLevelUri[]; static const int kAudioLevelDefaultId; // Header extension for RTP timestamp offset, see RFC 5450 for details: // http://tools.ietf.org/html/rfc5450 - static const char* kTimestampOffsetUri; + static const char kTimestampOffsetUri[]; static const int kTimestampOffsetDefaultId; // Header extension for absolute send time, see url for details: // http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time - static const char* kAbsSendTimeUri; + static const char kAbsSendTimeUri[]; static const int kAbsSendTimeDefaultId; // Header extension for coordination of video orientation, see url for // details: // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/ts_126114v120700p.pdf - static const char* kVideoRotationUri; + static const char kVideoRotationUri[]; static const int kVideoRotationDefaultId; // Header extension for video content type. E.g. default or screenshare. - static const char* kVideoContentTypeUri; + static const char kVideoContentTypeUri[]; static const int kVideoContentTypeDefaultId; // Header extension for video timing. - static const char* kVideoTimingUri; + static const char kVideoTimingUri[]; static const int kVideoTimingDefaultId; // Header extension for transport sequence number, see url for details: // http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions - static const char* kTransportSequenceNumberUri; + static const char kTransportSequenceNumberUri[]; static const int kTransportSequenceNumberDefaultId; - static const char* kPlayoutDelayUri; + static const char kPlayoutDelayUri[]; static const int kPlayoutDelayDefaultId; // Encryption of Header Extensions, see RFC 6904 for details: // https://tools.ietf.org/html/rfc6904 - static const char* kEncryptHeaderExtensionsUri; + static const char kEncryptHeaderExtensionsUri[]; // Inclusive min and max IDs for one-byte header extensions, per RFC5285. static const int kMinId; diff --git a/webrtc/media/engine/webrtcmediaengine.cc b/webrtc/media/engine/webrtcmediaengine.cc index e4c4c0dc33..774b6b7f90 100644 --- a/webrtc/media/engine/webrtcmediaengine.cc +++ b/webrtc/media/engine/webrtcmediaengine.cc @@ -157,7 +157,7 @@ namespace { // Remove mutually exclusive extensions with lower priority. void DiscardRedundantExtensions( std::vector* extensions, - rtc::ArrayView extensions_decreasing_prio) { + rtc::ArrayView extensions_decreasing_prio) { RTC_DCHECK(extensions); bool found = false; for (const char* uri : extensions_decreasing_prio) { @@ -228,7 +228,7 @@ std::vector FilterRtpExtensions( result.erase(it, result.end()); // Keep just the highest priority extension of any in the following list. - static const char* kBweExtensionPriorities[] = { + static const char* const kBweExtensionPriorities[] = { webrtc::RtpExtension::kTransportSequenceNumberUri, webrtc::RtpExtension::kAbsSendTimeUri, webrtc::RtpExtension::kTimestampOffsetUri}; diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_hist.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_hist.c index ae4f3d230e..f1eb5ae8f7 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_hist.c +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_hist.c @@ -34,7 +34,7 @@ */ int WebRtcIsacfix_EncHistMulti(Bitstr_enc *streamData, const int16_t *data, - const uint16_t **cdf, + const uint16_t *const *cdf, const int16_t lenData) { uint32_t W_lower; @@ -146,7 +146,7 @@ int WebRtcIsacfix_EncHistMulti(Bitstr_enc *streamData, */ int16_t WebRtcIsacfix_DecHistBisectMulti(int16_t *data, Bitstr_dec *streamData, - const uint16_t **cdf, + const uint16_t *const *cdf, const uint16_t *cdfSize, const int16_t lenData) { @@ -281,7 +281,7 @@ int16_t WebRtcIsacfix_DecHistBisectMulti(int16_t *data, */ int16_t WebRtcIsacfix_DecHistOneStepMulti(int16_t *data, Bitstr_dec *streamData, - const uint16_t **cdf, + const uint16_t *const *cdf, const uint16_t *initIndex, const int16_t lenData) { diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routins.h b/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routins.h index 40bbb4cdaa..c76bf1a266 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routins.h +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routins.h @@ -98,7 +98,7 @@ int WebRtcIsacfix_DecLogisticMulti2( int WebRtcIsacfix_EncHistMulti( Bitstr_enc *streamData, const int16_t *data, - const uint16_t **cdf, + const uint16_t *const *cdf, const int16_t lenData); @@ -125,7 +125,7 @@ int WebRtcIsacfix_EncHistMulti( int16_t WebRtcIsacfix_DecHistBisectMulti( int16_t *data, Bitstr_dec *streamData, - const uint16_t **cdf, + const uint16_t *const *cdf, const uint16_t *cdfSize, const int16_t lenData); @@ -153,7 +153,7 @@ int16_t WebRtcIsacfix_DecHistBisectMulti( int16_t WebRtcIsacfix_DecHistOneStepMulti( int16_t *data, Bitstr_dec *streamData, - const uint16_t **cdf, + const uint16_t *const *cdf, const uint16_t *initIndex, const int16_t lenData); diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c index 69ee414690..0a6e26f05e 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c @@ -1885,7 +1885,7 @@ const uint16_t kFrameLenCdf[4] = { 0, 21845, 43690, 65535}; /* pointer to cdf array for frame length indicator */ -const uint16_t *kFrameLenCdfPtr[1] = {kFrameLenCdf}; +const uint16_t * const kFrameLenCdfPtr[1] = {kFrameLenCdf}; /* initial cdf index for decoder of frame length indicator */ const uint16_t kFrameLenInitIndex[1] = {1}; @@ -1953,7 +1953,7 @@ const uint16_t kBwCdf[25] = { 62804, 65535}; /* pointer to cdf array for estimated bandwidth */ -const uint16_t *kBwCdfPtr[1] = {kBwCdf}; +const uint16_t * const kBwCdfPtr[1] = {kBwCdf}; /* initial cdf index for decoder of estimated bandwidth*/ const uint16_t kBwInitIndex[1] = {7}; diff --git a/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines.h b/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines.h index 43ba40e85e..d2fcbfeb73 100644 --- a/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines.h +++ b/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines.h @@ -43,20 +43,20 @@ int WebRtcIsac_DecLogisticMulti2( void WebRtcIsac_EncHistMulti( Bitstr *streamdata, /* in-/output struct containing bitstream */ const int *data, /* input: data vector */ - const uint16_t **cdf, /* input: array of cdf arrays */ + const uint16_t *const *cdf, /* input: array of cdf arrays */ const int N); /* input: data vector length */ int WebRtcIsac_DecHistBisectMulti( int *data, /* output: data vector */ Bitstr *streamdata, /* in-/output struct containing bitstream */ - const uint16_t **cdf, /* input: array of cdf arrays */ + 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 WebRtcIsac_DecHistOneStepMulti( int *data, /* output: data vector */ Bitstr *streamdata, /* in-/output struct containing bitstream */ - const uint16_t **cdf, /* input: array of cdf arrays */ + 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 */ diff --git a/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines_hist.c b/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines_hist.c index 47bbe31b8a..b229c679fc 100644 --- a/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines_hist.c +++ b/webrtc/modules/audio_coding/codecs/isac/main/source/arith_routines_hist.c @@ -17,7 +17,7 @@ */ void WebRtcIsac_EncHistMulti(Bitstr *streamdata, /* in-/output struct containing bitstream */ const int *data, /* input: data vector */ - const uint16_t **cdf, /* input: array of cdf arrays */ + const uint16_t *const *cdf, /* input: array of cdf arrays */ const int N) /* input: data vector length */ { uint32_t W_lower, W_upper; @@ -84,7 +84,7 @@ void WebRtcIsac_EncHistMulti(Bitstr *streamdata, /* in-/output struct containing */ int WebRtcIsac_DecHistBisectMulti(int *data, /* output: data vector */ Bitstr *streamdata, /* in-/output struct containing bitstream */ - const uint16_t **cdf, /* input: array of cdf arrays */ + 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 */ { @@ -192,7 +192,7 @@ int WebRtcIsac_DecHistBisectMulti(int *data, /* output: data vector */ */ int WebRtcIsac_DecHistOneStepMulti(int *data, /* output: data vector */ Bitstr *streamdata, /* in-/output struct containing bitstream */ - const uint16_t **cdf, /* input: array of cdf arrays */ + 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 */ { diff --git a/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.c b/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.c index f920dc2ef8..b494cc287a 100644 --- a/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.c +++ b/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.c @@ -42,7 +42,7 @@ static const uint16_t kOneBitEqualProbCdf[3] = { 0, 32768, 65535 }; /* Pointer to cdf array for encoder bandwidth (12 vs 16 kHz) indicator. */ -static const uint16_t* kOneBitEqualProbCdf_ptr[1] = { +static const uint16_t* const kOneBitEqualProbCdf_ptr[1] = { kOneBitEqualProbCdf }; /* @@ -1843,7 +1843,7 @@ static const uint16_t kBwCdf[25] = { 62804, 65535 }; /* pointer to cdf array for estimated bandwidth */ -static const uint16_t* kBwCdfPtr[1] = { kBwCdf }; +static const uint16_t* const kBwCdfPtr[1] = { kBwCdf }; /* initial cdf index for decoder of estimated bandwidth*/ static const uint16_t kBwInitIndex[1] = { 7 }; diff --git a/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.cc b/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.cc index 44ef82007b..f1c1f2beb7 100644 --- a/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.cc +++ b/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.cc @@ -19,7 +19,7 @@ namespace webrtc { namespace { -float kMinNoisePower = 100.f; +constexpr float kMinNoisePower = 100.f; } // namespace NoiseSpectrumEstimator::NoiseSpectrumEstimator(ApmDataDumper* data_dumper) diff --git a/webrtc/modules/pacing/alr_detector.cc b/webrtc/modules/pacing/alr_detector.cc index dcb0627fb8..993c6cd07e 100644 --- a/webrtc/modules/pacing/alr_detector.cc +++ b/webrtc/modules/pacing/alr_detector.cc @@ -20,9 +20,9 @@ namespace webrtc { -const char* AlrDetector::kScreenshareProbingBweExperimentName = +const char AlrDetector::kScreenshareProbingBweExperimentName[] = "WebRTC-ProbingScreenshareBwe"; -const char* AlrDetector::kStrictPacingAndProbingExperimentName = +const char AlrDetector::kStrictPacingAndProbingExperimentName[] = "WebRTC-StrictPacingAndProbing"; AlrDetector::AlrDetector() diff --git a/webrtc/modules/pacing/alr_detector.h b/webrtc/modules/pacing/alr_detector.h index 250002d9fb..0dcd9effd0 100644 --- a/webrtc/modules/pacing/alr_detector.h +++ b/webrtc/modules/pacing/alr_detector.h @@ -59,8 +59,8 @@ class AlrDetector { static constexpr int kDefaultAlrBandwidthUsagePercent = 65; static constexpr int kDefaultAlrStartBudgetLevelPercent = 80; static constexpr int kDefaultAlrStopBudgetLevelPercent = 50; - static const char* kScreenshareProbingBweExperimentName; - static const char* kStrictPacingAndProbingExperimentName; + static const char kScreenshareProbingBweExperimentName[]; + static const char kStrictPacingAndProbingExperimentName[]; void UpdateBudgetWithElapsedTime(int64_t delta_time_ms); void UpdateBudgetWithBytesSent(size_t bytes_sent); diff --git a/webrtc/modules/remote_bitrate_estimator/bwe_defines.cc b/webrtc/modules/remote_bitrate_estimator/bwe_defines.cc index 106b70c258..15eafc20f7 100644 --- a/webrtc/modules/remote_bitrate_estimator/bwe_defines.cc +++ b/webrtc/modules/remote_bitrate_estimator/bwe_defines.cc @@ -13,7 +13,7 @@ namespace webrtc { -const char* kBweTypeHistogram = "WebRTC.BWE.Types"; +const char kBweTypeHistogram[] = "WebRTC.BWE.Types"; namespace congestion_controller { int GetMinBitrateBps() { diff --git a/webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h b/webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h index 470ee37bda..21f9e57cad 100644 --- a/webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h +++ b/webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h @@ -25,7 +25,7 @@ int GetMinBitrateBps(); static const int64_t kBitrateWindowMs = 1000; -extern const char* kBweTypeHistogram; +extern const char kBweTypeHistogram[]; enum BweNames { kReceiverNoExtension = 0, diff --git a/webrtc/modules/rtp_rtcp/source/fec_private_tables_bursty.h b/webrtc/modules/rtp_rtcp/source/fec_private_tables_bursty.h index 0b39908bb1..1fce36a584 100644 --- a/webrtc/modules/rtp_rtcp/source/fec_private_tables_bursty.h +++ b/webrtc/modules/rtp_rtcp/source/fec_private_tables_bursty.h @@ -628,29 +628,29 @@ const uint8_t kMaskBursty12_12[24] = { 0x00, 0x30 }; -const uint8_t* kPacketMaskBursty1[1] = { +const uint8_t* const kPacketMaskBursty1[1] = { kMaskBursty1_1 }; -const uint8_t* kPacketMaskBursty2[2] = { +const uint8_t* const kPacketMaskBursty2[2] = { kMaskBursty2_1, kMaskBursty2_2 }; -const uint8_t* kPacketMaskBursty3[3] = { +const uint8_t* const kPacketMaskBursty3[3] = { kMaskBursty3_1, kMaskBursty3_2, kMaskBursty3_3 }; -const uint8_t* kPacketMaskBursty4[4] = { +const uint8_t* const kPacketMaskBursty4[4] = { kMaskBursty4_1, kMaskBursty4_2, kMaskBursty4_3, kMaskBursty4_4 }; -const uint8_t* kPacketMaskBursty5[5] = { +const uint8_t* const kPacketMaskBursty5[5] = { kMaskBursty5_1, kMaskBursty5_2, kMaskBursty5_3, @@ -658,7 +658,7 @@ const uint8_t* kPacketMaskBursty5[5] = { kMaskBursty5_5 }; -const uint8_t* kPacketMaskBursty6[6] = { +const uint8_t* const kPacketMaskBursty6[6] = { kMaskBursty6_1, kMaskBursty6_2, kMaskBursty6_3, @@ -667,7 +667,7 @@ const uint8_t* kPacketMaskBursty6[6] = { kMaskBursty6_6 }; -const uint8_t* kPacketMaskBursty7[7] = { +const uint8_t* const kPacketMaskBursty7[7] = { kMaskBursty7_1, kMaskBursty7_2, kMaskBursty7_3, @@ -677,7 +677,7 @@ const uint8_t* kPacketMaskBursty7[7] = { kMaskBursty7_7 }; -const uint8_t* kPacketMaskBursty8[8] = { +const uint8_t* const kPacketMaskBursty8[8] = { kMaskBursty8_1, kMaskBursty8_2, kMaskBursty8_3, @@ -688,7 +688,7 @@ const uint8_t* kPacketMaskBursty8[8] = { kMaskBursty8_8 }; -const uint8_t* kPacketMaskBursty9[9] = { +const uint8_t* const kPacketMaskBursty9[9] = { kMaskBursty9_1, kMaskBursty9_2, kMaskBursty9_3, @@ -700,7 +700,7 @@ const uint8_t* kPacketMaskBursty9[9] = { kMaskBursty9_9 }; -const uint8_t* kPacketMaskBursty10[10] = { +const uint8_t* const kPacketMaskBursty10[10] = { kMaskBursty10_1, kMaskBursty10_2, kMaskBursty10_3, @@ -713,7 +713,7 @@ const uint8_t* kPacketMaskBursty10[10] = { kMaskBursty10_10 }; -const uint8_t* kPacketMaskBursty11[11] = { +const uint8_t* const kPacketMaskBursty11[11] = { kMaskBursty11_1, kMaskBursty11_2, kMaskBursty11_3, @@ -727,7 +727,7 @@ const uint8_t* kPacketMaskBursty11[11] = { kMaskBursty11_11 }; -const uint8_t* kPacketMaskBursty12[12] = { +const uint8_t* const kPacketMaskBursty12[12] = { kMaskBursty12_1, kMaskBursty12_2, kMaskBursty12_3, @@ -742,7 +742,7 @@ const uint8_t* kPacketMaskBursty12[12] = { kMaskBursty12_12 }; -const uint8_t** kPacketMaskBurstyTbl[12] = { +const uint8_t* const* const kPacketMaskBurstyTbl[12] = { kPacketMaskBursty1, kPacketMaskBursty2, kPacketMaskBursty3, diff --git a/webrtc/modules/rtp_rtcp/source/fec_private_tables_random.h b/webrtc/modules/rtp_rtcp/source/fec_private_tables_random.h index 295d749873..798c585661 100644 --- a/webrtc/modules/rtp_rtcp/source/fec_private_tables_random.h +++ b/webrtc/modules/rtp_rtcp/source/fec_private_tables_random.h @@ -23148,29 +23148,29 @@ const uint8_t kMaskRandom9_9[18] = { 0x09, 0x00 }; -const uint8_t* kPacketMaskRandom1[1] = { +const uint8_t* const kPacketMaskRandom1[1] = { kMaskRandom1_1 }; -const uint8_t* kPacketMaskRandom2[2] = { +const uint8_t* const kPacketMaskRandom2[2] = { kMaskRandom2_1, kMaskRandom2_2 }; -const uint8_t* kPacketMaskRandom3[3] = { +const uint8_t* const kPacketMaskRandom3[3] = { kMaskRandom3_1, kMaskRandom3_2, kMaskRandom3_3 }; -const uint8_t* kPacketMaskRandom4[4] = { +const uint8_t* const kPacketMaskRandom4[4] = { kMaskRandom4_1, kMaskRandom4_2, kMaskRandom4_3, kMaskRandom4_4 }; -const uint8_t* kPacketMaskRandom5[5] = { +const uint8_t* const kPacketMaskRandom5[5] = { kMaskRandom5_1, kMaskRandom5_2, kMaskRandom5_3, @@ -23178,7 +23178,7 @@ const uint8_t* kPacketMaskRandom5[5] = { kMaskRandom5_5 }; -const uint8_t* kPacketMaskRandom6[6] = { +const uint8_t* const kPacketMaskRandom6[6] = { kMaskRandom6_1, kMaskRandom6_2, kMaskRandom6_3, @@ -23187,7 +23187,7 @@ const uint8_t* kPacketMaskRandom6[6] = { kMaskRandom6_6 }; -const uint8_t* kPacketMaskRandom7[7] = { +const uint8_t* const kPacketMaskRandom7[7] = { kMaskRandom7_1, kMaskRandom7_2, kMaskRandom7_3, @@ -23197,7 +23197,7 @@ const uint8_t* kPacketMaskRandom7[7] = { kMaskRandom7_7 }; -const uint8_t* kPacketMaskRandom8[8] = { +const uint8_t* const kPacketMaskRandom8[8] = { kMaskRandom8_1, kMaskRandom8_2, kMaskRandom8_3, @@ -23208,7 +23208,7 @@ const uint8_t* kPacketMaskRandom8[8] = { kMaskRandom8_8 }; -const uint8_t* kPacketMaskRandom9[9] = { +const uint8_t* const kPacketMaskRandom9[9] = { kMaskRandom9_1, kMaskRandom9_2, kMaskRandom9_3, @@ -23220,7 +23220,7 @@ const uint8_t* kPacketMaskRandom9[9] = { kMaskRandom9_9 }; -const uint8_t* kPacketMaskRandom10[10] = { +const uint8_t* const kPacketMaskRandom10[10] = { kMaskRandom10_1, kMaskRandom10_2, kMaskRandom10_3, @@ -23233,7 +23233,7 @@ const uint8_t* kPacketMaskRandom10[10] = { kMaskRandom10_10 }; -const uint8_t* kPacketMaskRandom11[11] = { +const uint8_t* const kPacketMaskRandom11[11] = { kMaskRandom11_1, kMaskRandom11_2, kMaskRandom11_3, @@ -23247,7 +23247,7 @@ const uint8_t* kPacketMaskRandom11[11] = { kMaskRandom11_11 }; -const uint8_t* kPacketMaskRandom12[12] = { +const uint8_t* const kPacketMaskRandom12[12] = { kMaskRandom12_1, kMaskRandom12_2, kMaskRandom12_3, @@ -23262,7 +23262,7 @@ const uint8_t* kPacketMaskRandom12[12] = { kMaskRandom12_12 }; -const uint8_t* kPacketMaskRandom13[13] = { +const uint8_t* const kPacketMaskRandom13[13] = { kMaskRandom13_1, kMaskRandom13_2, kMaskRandom13_3, @@ -23278,7 +23278,7 @@ const uint8_t* kPacketMaskRandom13[13] = { kMaskRandom13_13 }; -const uint8_t* kPacketMaskRandom14[14] = { +const uint8_t* const kPacketMaskRandom14[14] = { kMaskRandom14_1, kMaskRandom14_2, kMaskRandom14_3, @@ -23295,7 +23295,7 @@ const uint8_t* kPacketMaskRandom14[14] = { kMaskRandom14_14 }; -const uint8_t* kPacketMaskRandom15[15] = { +const uint8_t* const kPacketMaskRandom15[15] = { kMaskRandom15_1, kMaskRandom15_2, kMaskRandom15_3, @@ -23313,7 +23313,7 @@ const uint8_t* kPacketMaskRandom15[15] = { kMaskRandom15_15 }; -const uint8_t* kPacketMaskRandom16[16] = { +const uint8_t* const kPacketMaskRandom16[16] = { kMaskRandom16_1, kMaskRandom16_2, kMaskRandom16_3, @@ -23332,7 +23332,7 @@ const uint8_t* kPacketMaskRandom16[16] = { kMaskRandom16_16 }; -const uint8_t* kPacketMaskRandom17[17] = { +const uint8_t* const kPacketMaskRandom17[17] = { kMaskRandom17_1, kMaskRandom17_2, kMaskRandom17_3, @@ -23352,7 +23352,7 @@ const uint8_t* kPacketMaskRandom17[17] = { kMaskRandom17_17 }; -const uint8_t* kPacketMaskRandom18[18] = { +const uint8_t* const kPacketMaskRandom18[18] = { kMaskRandom18_1, kMaskRandom18_2, kMaskRandom18_3, @@ -23373,7 +23373,7 @@ const uint8_t* kPacketMaskRandom18[18] = { kMaskRandom18_18 }; -const uint8_t* kPacketMaskRandom19[19] = { +const uint8_t* const kPacketMaskRandom19[19] = { kMaskRandom19_1, kMaskRandom19_2, kMaskRandom19_3, @@ -23395,7 +23395,7 @@ const uint8_t* kPacketMaskRandom19[19] = { kMaskRandom19_19 }; -const uint8_t* kPacketMaskRandom20[20] = { +const uint8_t* const kPacketMaskRandom20[20] = { kMaskRandom20_1, kMaskRandom20_2, kMaskRandom20_3, @@ -23418,7 +23418,7 @@ const uint8_t* kPacketMaskRandom20[20] = { kMaskRandom20_20 }; -const uint8_t* kPacketMaskRandom21[21] = { +const uint8_t* const kPacketMaskRandom21[21] = { kMaskRandom21_1, kMaskRandom21_2, kMaskRandom21_3, @@ -23442,7 +23442,7 @@ const uint8_t* kPacketMaskRandom21[21] = { kMaskRandom21_21 }; -const uint8_t* kPacketMaskRandom22[22] = { +const uint8_t* const kPacketMaskRandom22[22] = { kMaskRandom22_1, kMaskRandom22_2, kMaskRandom22_3, @@ -23467,7 +23467,7 @@ const uint8_t* kPacketMaskRandom22[22] = { kMaskRandom22_22 }; -const uint8_t* kPacketMaskRandom23[23] = { +const uint8_t* const kPacketMaskRandom23[23] = { kMaskRandom23_1, kMaskRandom23_2, kMaskRandom23_3, @@ -23493,7 +23493,7 @@ const uint8_t* kPacketMaskRandom23[23] = { kMaskRandom23_23 }; -const uint8_t* kPacketMaskRandom24[24] = { +const uint8_t* const kPacketMaskRandom24[24] = { kMaskRandom24_1, kMaskRandom24_2, kMaskRandom24_3, @@ -23520,7 +23520,7 @@ const uint8_t* kPacketMaskRandom24[24] = { kMaskRandom24_24 }; -const uint8_t* kPacketMaskRandom25[25] = { +const uint8_t* const kPacketMaskRandom25[25] = { kMaskRandom25_1, kMaskRandom25_2, kMaskRandom25_3, @@ -23548,7 +23548,7 @@ const uint8_t* kPacketMaskRandom25[25] = { kMaskRandom25_25 }; -const uint8_t* kPacketMaskRandom26[26] = { +const uint8_t* const kPacketMaskRandom26[26] = { kMaskRandom26_1, kMaskRandom26_2, kMaskRandom26_3, @@ -23577,7 +23577,7 @@ const uint8_t* kPacketMaskRandom26[26] = { kMaskRandom26_26 }; -const uint8_t* kPacketMaskRandom27[27] = { +const uint8_t* const kPacketMaskRandom27[27] = { kMaskRandom27_1, kMaskRandom27_2, kMaskRandom27_3, @@ -23607,7 +23607,7 @@ const uint8_t* kPacketMaskRandom27[27] = { kMaskRandom27_27 }; -const uint8_t* kPacketMaskRandom28[28] = { +const uint8_t* const kPacketMaskRandom28[28] = { kMaskRandom28_1, kMaskRandom28_2, kMaskRandom28_3, @@ -23638,7 +23638,7 @@ const uint8_t* kPacketMaskRandom28[28] = { kMaskRandom28_28 }; -const uint8_t* kPacketMaskRandom29[29] = { +const uint8_t* const kPacketMaskRandom29[29] = { kMaskRandom29_1, kMaskRandom29_2, kMaskRandom29_3, @@ -23670,7 +23670,7 @@ const uint8_t* kPacketMaskRandom29[29] = { kMaskRandom29_29 }; -const uint8_t* kPacketMaskRandom30[30] = { +const uint8_t* const kPacketMaskRandom30[30] = { kMaskRandom30_1, kMaskRandom30_2, kMaskRandom30_3, @@ -23703,7 +23703,7 @@ const uint8_t* kPacketMaskRandom30[30] = { kMaskRandom30_30 }; -const uint8_t* kPacketMaskRandom31[31] = { +const uint8_t* const kPacketMaskRandom31[31] = { kMaskRandom31_1, kMaskRandom31_2, kMaskRandom31_3, @@ -23737,7 +23737,7 @@ const uint8_t* kPacketMaskRandom31[31] = { kMaskRandom31_31 }; -const uint8_t* kPacketMaskRandom32[32] = { +const uint8_t* const kPacketMaskRandom32[32] = { kMaskRandom32_1, kMaskRandom32_2, kMaskRandom32_3, @@ -23772,7 +23772,7 @@ const uint8_t* kPacketMaskRandom32[32] = { kMaskRandom32_32 }; -const uint8_t* kPacketMaskRandom33[33] = { +const uint8_t* const kPacketMaskRandom33[33] = { kMaskRandom33_1, kMaskRandom33_2, kMaskRandom33_3, @@ -23808,7 +23808,7 @@ const uint8_t* kPacketMaskRandom33[33] = { kMaskRandom33_33 }; -const uint8_t* kPacketMaskRandom34[34] = { +const uint8_t* const kPacketMaskRandom34[34] = { kMaskRandom34_1, kMaskRandom34_2, kMaskRandom34_3, @@ -23845,7 +23845,7 @@ const uint8_t* kPacketMaskRandom34[34] = { kMaskRandom34_34 }; -const uint8_t* kPacketMaskRandom35[35] = { +const uint8_t* const kPacketMaskRandom35[35] = { kMaskRandom35_1, kMaskRandom35_2, kMaskRandom35_3, @@ -23883,7 +23883,7 @@ const uint8_t* kPacketMaskRandom35[35] = { kMaskRandom35_35 }; -const uint8_t* kPacketMaskRandom36[36] = { +const uint8_t* const kPacketMaskRandom36[36] = { kMaskRandom36_1, kMaskRandom36_2, kMaskRandom36_3, @@ -23922,7 +23922,7 @@ const uint8_t* kPacketMaskRandom36[36] = { kMaskRandom36_36 }; -const uint8_t* kPacketMaskRandom37[37] = { +const uint8_t* const kPacketMaskRandom37[37] = { kMaskRandom37_1, kMaskRandom37_2, kMaskRandom37_3, @@ -23962,7 +23962,7 @@ const uint8_t* kPacketMaskRandom37[37] = { kMaskRandom37_37 }; -const uint8_t* kPacketMaskRandom38[38] = { +const uint8_t* const kPacketMaskRandom38[38] = { kMaskRandom38_1, kMaskRandom38_2, kMaskRandom38_3, @@ -24003,7 +24003,7 @@ const uint8_t* kPacketMaskRandom38[38] = { kMaskRandom38_38 }; -const uint8_t* kPacketMaskRandom39[39] = { +const uint8_t* const kPacketMaskRandom39[39] = { kMaskRandom39_1, kMaskRandom39_2, kMaskRandom39_3, @@ -24045,7 +24045,7 @@ const uint8_t* kPacketMaskRandom39[39] = { kMaskRandom39_39 }; -const uint8_t* kPacketMaskRandom40[40] = { +const uint8_t* const kPacketMaskRandom40[40] = { kMaskRandom40_1, kMaskRandom40_2, kMaskRandom40_3, @@ -24088,7 +24088,7 @@ const uint8_t* kPacketMaskRandom40[40] = { kMaskRandom40_40 }; -const uint8_t* kPacketMaskRandom41[41] = { +const uint8_t* const kPacketMaskRandom41[41] = { kMaskRandom41_1, kMaskRandom41_2, kMaskRandom41_3, @@ -24132,7 +24132,7 @@ const uint8_t* kPacketMaskRandom41[41] = { kMaskRandom41_41 }; -const uint8_t* kPacketMaskRandom42[42] = { +const uint8_t* const kPacketMaskRandom42[42] = { kMaskRandom42_1, kMaskRandom42_2, kMaskRandom42_3, @@ -24177,7 +24177,7 @@ const uint8_t* kPacketMaskRandom42[42] = { kMaskRandom42_42 }; -const uint8_t* kPacketMaskRandom43[43] = { +const uint8_t* const kPacketMaskRandom43[43] = { kMaskRandom43_1, kMaskRandom43_2, kMaskRandom43_3, @@ -24223,7 +24223,7 @@ const uint8_t* kPacketMaskRandom43[43] = { kMaskRandom43_43 }; -const uint8_t* kPacketMaskRandom44[44] = { +const uint8_t* const kPacketMaskRandom44[44] = { kMaskRandom44_1, kMaskRandom44_2, kMaskRandom44_3, @@ -24270,7 +24270,7 @@ const uint8_t* kPacketMaskRandom44[44] = { kMaskRandom44_44 }; -const uint8_t* kPacketMaskRandom45[45] = { +const uint8_t* const kPacketMaskRandom45[45] = { kMaskRandom45_1, kMaskRandom45_2, kMaskRandom45_3, @@ -24318,7 +24318,7 @@ const uint8_t* kPacketMaskRandom45[45] = { kMaskRandom45_45 }; -const uint8_t* kPacketMaskRandom46[46] = { +const uint8_t* const kPacketMaskRandom46[46] = { kMaskRandom46_1, kMaskRandom46_2, kMaskRandom46_3, @@ -24367,7 +24367,7 @@ const uint8_t* kPacketMaskRandom46[46] = { kMaskRandom46_46 }; -const uint8_t* kPacketMaskRandom47[47] = { +const uint8_t* const kPacketMaskRandom47[47] = { kMaskRandom47_1, kMaskRandom47_2, kMaskRandom47_3, @@ -24417,7 +24417,7 @@ const uint8_t* kPacketMaskRandom47[47] = { kMaskRandom47_47 }; -const uint8_t* kPacketMaskRandom48[48] = { +const uint8_t* const kPacketMaskRandom48[48] = { kMaskRandom48_1, kMaskRandom48_2, kMaskRandom48_3, @@ -24468,7 +24468,7 @@ const uint8_t* kPacketMaskRandom48[48] = { kMaskRandom48_48 }; -const uint8_t** kPacketMaskRandomTbl[48] = { +const uint8_t* const* const kPacketMaskRandomTbl[48] = { kPacketMaskRandom1, kPacketMaskRandom2, kPacketMaskRandom3, diff --git a/webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.cc b/webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.cc index 31fde0aec6..b411686143 100644 --- a/webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.cc +++ b/webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.cc @@ -179,7 +179,8 @@ FecMaskType PacketMaskTable::InitMaskType(FecMaskType fec_mask_type, // Returns the pointer to the packet mask tables corresponding to type // |fec_mask_type|. -const uint8_t*** PacketMaskTable::InitMaskTable(FecMaskType fec_mask_type) { +const uint8_t* const* const* PacketMaskTable::InitMaskTable( + FecMaskType fec_mask_type) { switch (fec_mask_type) { case kFecMaskRandom: { return kPacketMaskRandomTbl; diff --git a/webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h b/webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h index c61aea872c..b437cee400 100644 --- a/webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h +++ b/webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h @@ -35,15 +35,15 @@ class PacketMaskTable { PacketMaskTable(FecMaskType fec_mask_type, int num_media_packets); ~PacketMaskTable() {} FecMaskType fec_mask_type() const { return fec_mask_type_; } - const uint8_t*** fec_packet_mask_table() const { + const uint8_t* const* const* fec_packet_mask_table() const { return fec_packet_mask_table_; } private: FecMaskType InitMaskType(FecMaskType fec_mask_type, int num_media_packets); - const uint8_t*** InitMaskTable(FecMaskType fec_mask_type_); + const uint8_t* const* const* InitMaskTable(FecMaskType fec_mask_type_); const FecMaskType fec_mask_type_; - const uint8_t*** fec_packet_mask_table_; + const uint8_t* const* const* fec_packet_mask_table_; }; // Returns an array of packet masks. The mask of a single FEC packet diff --git a/webrtc/rtc_base/rtccertificategenerator.cc b/webrtc/rtc_base/rtccertificategenerator.cc index 74e9336144..037babdd1a 100644 --- a/webrtc/rtc_base/rtccertificategenerator.cc +++ b/webrtc/rtc_base/rtccertificategenerator.cc @@ -23,7 +23,7 @@ namespace { // A certificates' subject and issuer name. const char kIdentityName[] = "WebRTC"; -uint64_t kYearInSeconds = 365 * 24 * 60 * 60; +const uint64_t kYearInSeconds = 365 * 24 * 60 * 60; enum { MSG_GENERATE, diff --git a/webrtc/rtc_base/sslroots.h b/webrtc/rtc_base/sslroots.h index 9ddef0e6be..b224332321 100644 --- a/webrtc/rtc_base/sslroots.h +++ b/webrtc/rtc_base/sslroots.h @@ -4153,7 +4153,7 @@ const unsigned char UTN_DATACorp_SGC_Root_CA_certificate[1122]={ }; -const unsigned char* kSSLCertCertificateList[] = { +const unsigned char* const kSSLCertCertificateList[] = { GlobalSign_Root_CA_certificate, USERTrust_RSA_Certification_Authority_certificate, Starfield_Class_2_CA_certificate, diff --git a/webrtc/stats/rtcstats_objects.cc b/webrtc/stats/rtcstats_objects.cc index bd8e9cd30c..f24fd66fcf 100644 --- a/webrtc/stats/rtcstats_objects.cc +++ b/webrtc/stats/rtcstats_objects.cc @@ -12,31 +12,31 @@ namespace webrtc { -const char* RTCDataChannelState::kConnecting = "connecting"; -const char* RTCDataChannelState::kOpen = "open"; -const char* RTCDataChannelState::kClosing = "closing"; -const char* RTCDataChannelState::kClosed = "closed"; +const char* const RTCDataChannelState::kConnecting = "connecting"; +const char* const RTCDataChannelState::kOpen = "open"; +const char* const RTCDataChannelState::kClosing = "closing"; +const char* const RTCDataChannelState::kClosed = "closed"; -const char* RTCStatsIceCandidatePairState::kFrozen = "frozen"; -const char* RTCStatsIceCandidatePairState::kWaiting = "waiting"; -const char* RTCStatsIceCandidatePairState::kInProgress = "in-progress"; -const char* RTCStatsIceCandidatePairState::kFailed = "failed"; -const char* RTCStatsIceCandidatePairState::kSucceeded = "succeeded"; +const char* const RTCStatsIceCandidatePairState::kFrozen = "frozen"; +const char* const RTCStatsIceCandidatePairState::kWaiting = "waiting"; +const char* const RTCStatsIceCandidatePairState::kInProgress = "in-progress"; +const char* const RTCStatsIceCandidatePairState::kFailed = "failed"; +const char* const RTCStatsIceCandidatePairState::kSucceeded = "succeeded"; // Strings defined in https://tools.ietf.org/html/rfc5245. -const char* RTCIceCandidateType::kHost = "host"; -const char* RTCIceCandidateType::kSrflx = "srflx"; -const char* RTCIceCandidateType::kPrflx = "prflx"; -const char* RTCIceCandidateType::kRelay = "relay"; +const char* const RTCIceCandidateType::kHost = "host"; +const char* const RTCIceCandidateType::kSrflx = "srflx"; +const char* const RTCIceCandidateType::kPrflx = "prflx"; +const char* const RTCIceCandidateType::kRelay = "relay"; -const char* RTCDtlsTransportState::kNew = "new"; -const char* RTCDtlsTransportState::kConnecting = "connecting"; -const char* RTCDtlsTransportState::kConnected = "connected"; -const char* RTCDtlsTransportState::kClosed = "closed"; -const char* RTCDtlsTransportState::kFailed = "failed"; +const char* const RTCDtlsTransportState::kNew = "new"; +const char* const RTCDtlsTransportState::kConnecting = "connecting"; +const char* const RTCDtlsTransportState::kConnected = "connected"; +const char* const RTCDtlsTransportState::kClosed = "closed"; +const char* const RTCDtlsTransportState::kFailed = "failed"; -const char* RTCMediaStreamTrackKind::kAudio = "audio"; -const char* RTCMediaStreamTrackKind::kVideo = "video"; +const char* const RTCMediaStreamTrackKind::kAudio = "audio"; +const char* const RTCMediaStreamTrackKind::kVideo = "video"; WEBRTC_RTCSTATS_IMPL(RTCCertificateStats, RTCStats, "certificate", &fingerprint,