Skip to content

Commit

Permalink
refactor(multi_object_tracker): use const reference in loop and simpl…
Browse files Browse the repository at this point in the history
…ify tracker update logic

Signed-off-by: Taekjin LEE <[email protected]>
  • Loading branch information
technolojin committed Feb 28, 2025
1 parent 745df6c commit f8caa05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void TrackerObjectDebugger::process()
if (object_data_list_.empty()) return;

// update uuid_int
for (auto & object_data : object_data_list_) {
for (const auto & object_data : object_data_list_) {
current_ids_.insert(uuidToInt(object_data.uuid));

Check warning on line 144 in perception/autoware_multi_object_tracker/src/debugger/debug_object.cpp

View check run for this annotation

Codecov / codecov/patch

perception/autoware_multi_object_tracker/src/debugger/debug_object.cpp#L144

Added line #L144 was not covered by tests
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void TrackerProcessor::spawn(
new_object.channel_index, new_object.existence_probability);

Check warning on line 111 in perception/autoware_multi_object_tracker/src/processor/processor.cpp

View check run for this annotation

Codecov / codecov/patch

perception/autoware_multi_object_tracker/src/processor/processor.cpp#L110-L111

Added lines #L110 - L111 were not covered by tests

// Update the tracker with the new object
if (tracker) list_tracker_.push_back(tracker);
list_tracker_.push_back(tracker);

Check warning on line 114 in perception/autoware_multi_object_tracker/src/processor/processor.cpp

View check run for this annotation

Codecov / codecov/patch

perception/autoware_multi_object_tracker/src/processor/processor.cpp#L114

Added line #L114 was not covered by tests
}
}

Expand Down

0 comments on commit f8caa05

Please sign in to comment.