Workaround for a stupid compiler reporting potential null-pointer dereference
This commit is contained in:
1 parent
433cd8222f
commit
1865b92e90
3 files changed
+72
-70
No files matched your search
@@ -62,9 +62,11 @@ int main()
|
||||
|
||||
std::vector<state> track(num_measurements);
|
||||
|
||||
// We need an initial estimate of track[0] as there is no previous state to get a prediction from
|
||||
track[0].range.estimated_current_state = 30'000q_m;
|
||||
track[0].speed.estimated_current_state = 40.0q_mps;
|
||||
if(track.size() > 0) {
|
||||
// We need an initial estimate of track[0] as there is no previous state to get a prediction from
|
||||
track[0].range.estimated_current_state = 30'000q_m;
|
||||
track[0].speed.estimated_current_state = 40.0q_mps;
|
||||
}
|
||||
|
||||
for (auto n = 0U; n < num_measurements; ++n) {
|
||||
if (n > 0) {
|
||||
|
||||
Reference in new issue
Block a user