Remove unused code. (#522)

Removes FindConnectedComponent() from a proto message.
master
Wolfgang Hess 2017-09-12 18:07:18 +02:00 committed by GitHub
parent b383f18365
commit 57d53b6d53
2 changed files with 0 additions and 23 deletions

View File

@ -126,22 +126,5 @@ proto::ConnectedComponents ToProto(
return proto; 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 mapping
} // namespace cartographer } // namespace cartographer

View File

@ -84,12 +84,6 @@ class ConnectedComponents {
proto::ConnectedComponents ToProto( proto::ConnectedComponents ToProto(
std::vector<std::vector<int>> connected_components); std::vector<std::vector<int>> 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 mapping
} // namespace cartographer } // namespace cartographer