1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00

Do not shadow variable

This commit is contained in:
Carles Fernandez 2020-11-19 14:03:04 +01:00
parent 6b28ef9e7c
commit 0d1d89b8db
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -213,9 +213,9 @@ void Galileo_Cnav_Message::read_MT1_body(const std::string& message_string)
std::string msg = message.substr(0, HAS_MSG_SATELLITE_MASK_LENGTH); std::string msg = message.substr(0, HAS_MSG_SATELLITE_MASK_LENGTH);
d_HAS_data.satellite_mask[i] = read_has_message_body_uint64(msg); d_HAS_data.satellite_mask[i] = read_has_message_body_uint64(msg);
int ones_in_satellite_mask = 0; int ones_in_satellite_mask = 0;
for (char i : msg) for (char c : msg)
{ {
if (i == '1') if (c == '1')
{ {
ones_in_satellite_mask++; ones_in_satellite_mask++;
} }
@ -226,9 +226,9 @@ void Galileo_Cnav_Message::read_MT1_body(const std::string& message_string)
msg = message.substr(0, HAS_MSG_SIGNAL_MASK_LENGTH); msg = message.substr(0, HAS_MSG_SIGNAL_MASK_LENGTH);
d_HAS_data.signal_mask[i] = read_has_message_body_uint16(msg); d_HAS_data.signal_mask[i] = read_has_message_body_uint16(msg);
int ones_in_signal_mask = 0; int ones_in_signal_mask = 0;
for (char i : msg) for (char c : msg)
{ {
if (i == '1') if (c == '1')
{ {
ones_in_signal_mask++; ones_in_signal_mask++;
} }