From 2d13ee969869405bb038d12fdd51e49921e9e713 Mon Sep 17 00:00:00 2001 From: Joseph Mirabel <jmirabel@laas.fr> Date: Wed, 25 May 2016 20:44:44 +0200 Subject: [PATCH] Move RoadmapNodes_t to namespace hpp::manipulation --- include/hpp/manipulation/connected-component.hh | 1 - include/hpp/manipulation/fwd.hh | 1 + src/connected-component.cc | 2 +- src/roadmap.cc | 5 ++--- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/hpp/manipulation/connected-component.hh b/include/hpp/manipulation/connected-component.hh index c87d6c24..4577c70b 100644 --- a/include/hpp/manipulation/connected-component.hh +++ b/include/hpp/manipulation/connected-component.hh @@ -32,7 +32,6 @@ namespace hpp { class HPP_MANIPULATION_DLLAPI ConnectedComponent : public core::ConnectedComponent { public: - typedef std::vector<RoadmapNodePtr_t> RoadmapNodes_t; /// Map of graph nodes within the connected component typedef std::map <graph::NodePtr_t, RoadmapNodes_t> GraphNodes_t; diff --git a/include/hpp/manipulation/fwd.hh b/include/hpp/manipulation/fwd.hh index f8d2297f..8c4fb078 100644 --- a/include/hpp/manipulation/fwd.hh +++ b/include/hpp/manipulation/fwd.hh @@ -55,6 +55,7 @@ namespace hpp { typedef boost::shared_ptr <Roadmap> RoadmapPtr_t; HPP_PREDEF_CLASS (RoadmapNode); typedef RoadmapNode* RoadmapNodePtr_t; + typedef std::vector<RoadmapNodePtr_t> RoadmapNodes_t; HPP_PREDEF_CLASS (ConnectedComponent); typedef boost::shared_ptr<ConnectedComponent> ConnectedComponentPtr_t; HPP_PREDEF_CLASS (WeighedDistance); diff --git a/src/connected-component.cc b/src/connected-component.cc index de92fb53..101f2c34 100644 --- a/src/connected-component.cc +++ b/src/connected-component.cc @@ -74,7 +74,7 @@ namespace hpp { } - ConnectedComponent::RoadmapNodes_t ConnectedComponent::getRoadmapNodes (const graph::NodePtr_t graphNode) + RoadmapNodes_t ConnectedComponent::getRoadmapNodes (const graph::NodePtr_t graphNode) { RoadmapNodes_t res; GraphNodes_t::iterator mapIt = graphNodeMap_.find(graphNode); diff --git a/src/roadmap.cc b/src/roadmap.cc index 9b4dcd41..746733c4 100644 --- a/src/roadmap.cc +++ b/src/roadmap.cc @@ -83,9 +83,8 @@ namespace hpp { { core::NodePtr_t result = NULL; minDistance = std::numeric_limits <value_type>::infinity (); - ConnectedComponent::RoadmapNodes_t roadmapNodes = connectedComponent->getRoadmapNodes (node); - for (ConnectedComponent::RoadmapNodes_t::const_iterator itNode = - roadmapNodes.begin (); + RoadmapNodes_t roadmapNodes = connectedComponent->getRoadmapNodes (node); + for (RoadmapNodes_t::const_iterator itNode = roadmapNodes.begin (); itNode != roadmapNodes.end (); ++itNode) { value_type d = (*distance()) (*(*itNode)->configuration (), *configuration); -- GitLab