Skip to content

Commit

Permalink
fix(pointcloud_preprocessor): fix arrayIndexThenCheck warning (#7547)
Browse files Browse the repository at this point in the history
* fix(pointcloud_preprocessor): fix arrayIndexThenCheck waarning

Signed-off-by: Ryuta Kambe <ryuta.kambe@tier4.jp>

* fix deleted_azimuths's index

Signed-off-by: Ryuta Kambe <ryuta.kambe@tier4.jp>

* style(pre-commit): autofix

* fix typo

Signed-off-by: Ryuta Kambe <ryuta.kambe@tier4.jp>

---------

Signed-off-by: Ryuta Kambe <ryuta.kambe@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
veqcc and pre-commit-ci[bot] authored Jun 21, 2024
1 parent 8499417 commit a91bfeb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ void DualReturnOutlierFilterComponent::filter(
if (deleted_azimuths.size() == 0) {
continue;
}
while ((uint)deleted_azimuths[current_deleted_index] <
while (current_deleted_index < deleted_azimuths.size() &&
(uint)deleted_azimuths[current_deleted_index] <
((i + static_cast<uint>(min_azimuth / horizontal_resolution) + 1) *
horizontal_resolution) &&
current_deleted_index < (deleted_azimuths.size() - 1)) {
horizontal_resolution)) {
noise_frequency[i] = noise_frequency[i] + 1;
current_deleted_index++;
}
Expand Down

0 comments on commit a91bfeb

Please sign in to comment.