AP_ADSB: clarified some minor logic
This commit is contained in:
parent
0ed868d97b
commit
8036912173
@ -197,7 +197,7 @@ void AP_ADSB::delete_vehicle(uint16_t index)
|
|||||||
_highest_threat_distance = 0;
|
_highest_threat_distance = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index != _vehicle_count-1) {
|
if (index != (_vehicle_count-1)) {
|
||||||
_vehicle_list[index] = _vehicle_list[_vehicle_count-1];
|
_vehicle_list[index] = _vehicle_list[_vehicle_count-1];
|
||||||
}
|
}
|
||||||
// TODO: is memset needed? When we decrement the index we essentially forget about it
|
// TODO: is memset needed? When we decrement the index we essentially forget about it
|
||||||
|
Loading…
Reference in New Issue
Block a user