From d962685f3aae135a722d3261644b7485305deaf3 Mon Sep 17 00:00:00 2001 From: Joseph Mirabel <jmirabel@laas.fr> Date: Mon, 21 Jul 2014 15:39:31 +0200 Subject: [PATCH] Add typedef for containers of Edge, Node and NodeSelector --- include/hpp/manipulation/graph/graph.hh | 2 +- include/hpp/manipulation/graph/node-selector.hh | 2 +- include/hpp/manipulation/graph/node.hh | 2 +- src/graph/graph.cc | 2 +- src/graph/node-selector.cc | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/hpp/manipulation/graph/graph.hh b/include/hpp/manipulation/graph/graph.hh index aaa60cd1..34ea8a8c 100644 --- a/include/hpp/manipulation/graph/graph.hh +++ b/include/hpp/manipulation/graph/graph.hh @@ -84,7 +84,7 @@ namespace hpp { private: /// This list contains a node selector for each end-effector. - std::vector < NodeSelectorPtr_t > nodeSelectors_; + NodeSelectors_t nodeSelectors_; /// A set of constraints that will always be used, for example /// stability constraints. diff --git a/include/hpp/manipulation/graph/node-selector.hh b/include/hpp/manipulation/graph/node-selector.hh index 153f7809..01c2b57e 100644 --- a/include/hpp/manipulation/graph/node-selector.hh +++ b/include/hpp/manipulation/graph/node-selector.hh @@ -52,7 +52,7 @@ namespace hpp { private: /// List of the states of one end-effector, ordered by priority. - std::vector< NodePtr_t > orderedStates_; + Nodes_t orderedStates_; /// Weak pointer to itself. NodeSelectorPtr_t wkPtr_; diff --git a/include/hpp/manipulation/graph/node.hh b/include/hpp/manipulation/graph/node.hh index c8b7e75b..4055e8de 100644 --- a/include/hpp/manipulation/graph/node.hh +++ b/include/hpp/manipulation/graph/node.hh @@ -84,7 +84,7 @@ namespace hpp { private: /// List of possible motions from this state (i.e. the outgoing /// vertices). - std::vector < EdgePtr_t > neighbors_; + Edges_t neighbors_; /// Set of constraints to be statisfied. ConstraintPtr_t constraints_; diff --git a/src/graph/graph.cc b/src/graph/graph.cc index 9c65c835..3bcfdd20 100644 --- a/src/graph/graph.cc +++ b/src/graph/graph.cc @@ -46,7 +46,7 @@ namespace hpp { Nodes_t Graph::getNode(const Configuration_t config) { Nodes_t nodes; - for (std::vector < NodeSelectorPtr_t >::iterator it = nodeSelectors_.begin(); + for (NodeSelectors_t::iterator it = nodeSelectors_.begin(); it == nodeSelectors_.end(); it++) nodes.push_back( (*it)->getNode(config) ); return nodes; diff --git a/src/graph/node-selector.cc b/src/graph/node-selector.cc index 8c72c296..4e666436 100644 --- a/src/graph/node-selector.cc +++ b/src/graph/node-selector.cc @@ -44,7 +44,7 @@ namespace hpp { NodePtr_t NodeSelector::getNode(const Configuration_t config) { - for (std::vector< NodePtr_t >::iterator it = orderedStates_.begin(); + for (Nodes_t::iterator it = orderedStates_.begin(); orderedStates_.end() == it; it++) if ((*it)->contains(config)) return *it; -- GitLab