mirror of https://github.com/gnss-sdr/gnss-sdr
Avoid shadowed variables
This commit is contained in:
parent
b751b4b8a1
commit
0a438ec726
|
@ -31,6 +31,11 @@ All notable changes to GNSS-SDR will be documented in this file.
|
||||||
- `geohash`, an
|
- `geohash`, an
|
||||||
[encoded geographic location](https://en.wikipedia.org/wiki/Geohash).
|
[encoded geographic location](https://en.wikipedia.org/wiki/Geohash).
|
||||||
|
|
||||||
|
### Improvements in Maintainability
|
||||||
|
|
||||||
|
- Removed useless casts and shadowed variables, improving source code
|
||||||
|
readability.
|
||||||
|
|
||||||
### Improvements in Portability:
|
### Improvements in Portability:
|
||||||
|
|
||||||
- Updated local `cpu_features` library to v0.9.0.
|
- Updated local `cpu_features` library to v0.9.0.
|
||||||
|
|
|
@ -11309,7 +11309,6 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ga
|
||||||
it++)
|
it++)
|
||||||
{
|
{
|
||||||
lineObs.clear();
|
lineObs.clear();
|
||||||
const auto satsys_gal = satelliteSystem.find("Galileo");
|
|
||||||
if (satsys_gal != satelliteSystem.cend())
|
if (satsys_gal != satelliteSystem.cend())
|
||||||
{
|
{
|
||||||
lineObs += satsys_gal->second;
|
lineObs += satsys_gal->second;
|
||||||
|
|
|
@ -423,9 +423,10 @@ int Viterbi_Decoder_Sbas::parity_counter(int symbol, int length)
|
||||||
|
|
||||||
|
|
||||||
// prev helper class
|
// prev helper class
|
||||||
Viterbi_Decoder_Sbas::Prev::Prev(int states, int t) : num_states(states),
|
Viterbi_Decoder_Sbas::Prev::Prev(int states,
|
||||||
t(t),
|
int tt) : num_states(states),
|
||||||
refcount(1)
|
t(tt),
|
||||||
|
refcount(1)
|
||||||
{
|
{
|
||||||
state = std::vector<int>(num_states);
|
state = std::vector<int>(num_states);
|
||||||
v_bit = std::vector<int>(num_states);
|
v_bit = std::vector<int>(num_states);
|
||||||
|
|
|
@ -56,7 +56,7 @@ private:
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int num_states;
|
int num_states;
|
||||||
Prev(int states, int t);
|
Prev(int states, int tt);
|
||||||
Prev(const Prev& prev);
|
Prev(const Prev& prev);
|
||||||
Prev& operator=(const Prev& other);
|
Prev& operator=(const Prev& other);
|
||||||
~Prev();
|
~Prev();
|
||||||
|
|
|
@ -602,10 +602,10 @@ float Galileo_HAS_data::get_code_bias_m(const std::string& signal, int PRN) cons
|
||||||
if (!code_bias.empty() && !targeted_system.empty())
|
if (!code_bias.empty() && !targeted_system.empty())
|
||||||
{
|
{
|
||||||
std::vector<std::string> systems = this->get_systems_string();
|
std::vector<std::string> systems = this->get_systems_string();
|
||||||
auto Nsys = systems.size();
|
auto Nsys_ = systems.size();
|
||||||
auto nsys_index = std::distance(systems.cbegin(), std::find(systems.cbegin(), systems.cend(), targeted_system));
|
auto nsys_index = std::distance(systems.cbegin(), std::find(systems.cbegin(), systems.cend(), targeted_system));
|
||||||
|
|
||||||
if (static_cast<size_t>(nsys_index) < Nsys)
|
if (static_cast<size_t>(nsys_index) < Nsys_)
|
||||||
{
|
{
|
||||||
std::vector<std::string> signals = get_signals_in_mask(static_cast<uint8_t>(nsys_index));
|
std::vector<std::string> signals = get_signals_in_mask(static_cast<uint8_t>(nsys_index));
|
||||||
auto sig_index = std::distance(signals.cbegin(), std::find(signals.cbegin(), signals.cend(), signal));
|
auto sig_index = std::distance(signals.cbegin(), std::find(signals.cbegin(), signals.cend(), signal));
|
||||||
|
@ -678,10 +678,10 @@ float Galileo_HAS_data::get_phase_bias_cycle(const std::string& signal, int PRN)
|
||||||
if (!phase_bias.empty() && !targeted_system.empty())
|
if (!phase_bias.empty() && !targeted_system.empty())
|
||||||
{
|
{
|
||||||
std::vector<std::string> systems = this->get_systems_string();
|
std::vector<std::string> systems = this->get_systems_string();
|
||||||
auto Nsys = systems.size();
|
auto Nsys_ = systems.size();
|
||||||
auto nsys_index = std::distance(systems.cbegin(), std::find(systems.cbegin(), systems.cend(), targeted_system));
|
auto nsys_index = std::distance(systems.cbegin(), std::find(systems.cbegin(), systems.cend(), targeted_system));
|
||||||
|
|
||||||
if (static_cast<size_t>(nsys_index) < Nsys)
|
if (static_cast<size_t>(nsys_index) < Nsys_)
|
||||||
{
|
{
|
||||||
std::vector<std::string> signals = get_signals_in_mask(static_cast<uint8_t>(nsys_index));
|
std::vector<std::string> signals = get_signals_in_mask(static_cast<uint8_t>(nsys_index));
|
||||||
auto sig_index = std::distance(signals.cbegin(), std::find(signals.cbegin(), signals.cend(), signal));
|
auto sig_index = std::distance(signals.cbegin(), std::find(signals.cbegin(), signals.cend(), signal));
|
||||||
|
|
Loading…
Reference in New Issue