From a2de13786484ec710b793e7fe478d3b2c1fe631c Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 16 Aug 2018 14:49:32 +0200 Subject: [PATCH] Imporve const correctness --- src/algorithms/libs/galileo_e1_signal_processing.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/algorithms/libs/galileo_e1_signal_processing.cc b/src/algorithms/libs/galileo_e1_signal_processing.cc index 23580afc7..b265ffb43 100644 --- a/src/algorithms/libs/galileo_e1_signal_processing.cc +++ b/src/algorithms/libs/galileo_e1_signal_processing.cc @@ -108,7 +108,7 @@ void galileo_e1_sinboc_61_gen_int(int* _dest, int* _prn, uint32_t _length_out) void galileo_e1_code_gen_sinboc11_float(float* _dest, char _Signal[3], uint32_t _prn) { std::string _galileo_signal = _Signal; - uint32_t _codeLength = static_cast(Galileo_E1_B_CODE_LENGTH_CHIPS); + const uint32_t _codeLength = static_cast(Galileo_E1_B_CODE_LENGTH_CHIPS); int32_t primary_code_E1_chips[4092]; // _codeLength not accepted by Clang galileo_e1_code_gen_int(primary_code_E1_chips, _Signal, _prn); //generate Galileo E1 code, 1 sample per chip for (uint32_t i = 0; i < _codeLength; i++) @@ -159,8 +159,8 @@ void galileo_e1_code_gen_float_sampled(float* _dest, char _Signal[3], std::string _galileo_signal = _Signal; uint32_t _samplesPerCode; const int32_t _codeFreqBasis = Galileo_E1_CODE_CHIP_RATE_HZ; // Hz - uint32_t _codeLength = static_cast(Galileo_E1_B_CODE_LENGTH_CHIPS); - int32_t* primary_code_E1_chips = static_cast(volk_gnsssdr_malloc(static_cast(Galileo_E1_B_CODE_LENGTH_CHIPS) * sizeof(int32_t), volk_gnsssdr_get_alignment())); + uint32_t _codeLength = static_cast(Galileo_E1_B_CODE_LENGTH_CHIPS); + int32_t* primary_code_E1_chips = static_cast(volk_gnsssdr_malloc(static_cast(Galileo_E1_B_CODE_LENGTH_CHIPS) * sizeof(int32_t), volk_gnsssdr_get_alignment())); _samplesPerCode = static_cast(static_cast(_fs) / (static_cast(_codeFreqBasis) / static_cast(_codeLength))); const int32_t _samplesPerChip = (_cboc == true) ? 12 : 2;