Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
  • Loading branch information
badai-nguyen committed Mar 6, 2025
1 parent 7d8359a commit c558c3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,7 @@ bool VoxelBasedApproximateDynamicMapLoader::is_close_to_map(

const int index = map_cell_voxel_grid.getCentroidIndexAt(
map_cell_voxel_grid.getGridCoordinates(point.x, point.y, point.z));
if (index == -1) {
return false;
} else {
return true;
}
return false;
return (index != -1);
}

VoxelBasedApproximateCompareMapFilterComponent::VoxelBasedApproximateCompareMapFilterComponent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,8 @@ bool VoxelDistanceBasedDynamicMapLoader::is_close_to_map(
map_cell_voxel_grid = current_voxel_grid_array_.at(map_grid_index)->map_cell_voxel_grid;
map_cell_kdtree = current_voxel_grid_array_.at(map_grid_index)->map_cell_kdtree;
}
if (is_close_to_neighbor_voxels(
point, distance_threshold, map_cell_voxel_grid, map_cell_kdtree)) {
return true;
}
return false;
return is_close_to_neighbor_voxels(
point, distance_threshold, map_cell_voxel_grid, map_cell_kdtree);
}

VoxelDistanceBasedCompareMapFilterComponent::VoxelDistanceBasedCompareMapFilterComponent(
Expand Down

0 comments on commit c558c3f

Please sign in to comment.