Make ASAN compilation mode happy: fill d_genpoly_index vector in constructor

This commit is contained in:
Carles Fernandez 2021-09-23 18:08:12 +02:00
parent a42c66ec29
commit 38cffe480b
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
1 changed files with 3 additions and 1 deletions

View File

@ -446,6 +446,7 @@ ReedSolomon::ReedSolomon(const std::string& gnss_signal)
d_data_symbols_shortened = d_symbols_per_block - d_shortening;
d_a0 = static_cast<uint8_t>(d_symbols_per_block);
d_genpoly_index = std::vector<uint8_t>(d_nroots + 1);
init_log_tables();
init_alpha_tables();
@ -534,6 +535,8 @@ ReedSolomon::ReedSolomon(int nroots,
}
}
d_genpoly_index = std::vector<uint8_t>(d_nroots + 1);
init_log_tables();
init_alpha_tables();
}
@ -643,7 +646,6 @@ void ReedSolomon::init_alpha_tables()
d_iprim = iprim / d_prim;
// get indexes of generator polymonial coefficients
d_genpoly_index.reserve(d_nroots + 1);
for (int i = 0; i <= d_nroots; i++)
{
d_genpoly_index[i] = d_index_of[d_genpoly_coeff[i]];