From 57d53b6d539d7dfbad54beb4c09f2b2e92eae831 Mon Sep 17 00:00:00 2001 From: Wolfgang Hess Date: Tue, 12 Sep 2017 18:07:18 +0200 Subject: [PATCH] Remove unused code. (#522) Removes FindConnectedComponent() from a proto message. --- cartographer/mapping/connected_components.cc | 17 ----------------- cartographer/mapping/connected_components.h | 6 ------ 2 files changed, 23 deletions(-) diff --git a/cartographer/mapping/connected_components.cc b/cartographer/mapping/connected_components.cc index 1761e3b..4290908 100644 --- a/cartographer/mapping/connected_components.cc +++ b/cartographer/mapping/connected_components.cc @@ -126,22 +126,5 @@ proto::ConnectedComponents ToProto( return proto; } -proto::ConnectedComponents::ConnectedComponent FindConnectedComponent( - const proto::ConnectedComponents& connected_components, - const int trajectory_id) { - for (const auto& connected_component : - connected_components.connected_component()) { - if (std::find(connected_component.trajectory_id().begin(), - connected_component.trajectory_id().end(), - trajectory_id) != connected_component.trajectory_id().end()) { - return connected_component; - } - } - - proto::ConnectedComponents::ConnectedComponent connected_component; - connected_component.add_trajectory_id(trajectory_id); - return connected_component; -} - } // namespace mapping } // namespace cartographer diff --git a/cartographer/mapping/connected_components.h b/cartographer/mapping/connected_components.h index dbf3e8a..6899e80 100644 --- a/cartographer/mapping/connected_components.h +++ b/cartographer/mapping/connected_components.h @@ -84,12 +84,6 @@ class ConnectedComponents { proto::ConnectedComponents ToProto( std::vector> connected_components); -// Returns the connected component containing 'trajectory_id'. -proto::ConnectedComponents::ConnectedComponent FindConnectedComponent( - const cartographer::mapping::proto::ConnectedComponents& - connected_components, - int trajectory_id); - } // namespace mapping } // namespace cartographer