Skip to content
Snippets Groups Projects
Commit 4de11682 authored by Florent Lamiraux's avatar Florent Lamiraux Committed by Florent Lamiraux florent@laas.fr
Browse files

Fix compilation warnings.

parent 5a0aab9e
No related branches found
No related tags found
No related merge requests found
...@@ -132,7 +132,7 @@ namespace hpp { ...@@ -132,7 +132,7 @@ namespace hpp {
Edges_t edges; Edges_t edges;
for (Neighbors_t::const_iterator it = from->neighbors ().begin (); for (Neighbors_t::const_iterator it = from->neighbors ().begin ();
it != from->neighbors ().end (); ++it) { it != from->neighbors ().end (); ++it) {
if (it->second->to () == to) if (it->second->stateTo () == to)
edges.push_back (it->second); edges.push_back (it->second);
} }
return edges; return edges;
......
...@@ -92,13 +92,13 @@ namespace hpp { ...@@ -92,13 +92,13 @@ namespace hpp {
const Neighbors_t& n = state->neighbors(); const Neighbors_t& n = state->neighbors();
/// You stay in the same state /// You stay in the same state
for (Neighbors_t::const_iterator it = n.begin (); it != n.end (); ++it) for (Neighbors_t::const_iterator it = n.begin (); it != n.end (); ++it)
if (it->second->to () == state) if (it->second->stateTo () == state)
nn.insert (it->second, it->first); nn.insert (it->second, it->first);
/// Go from state it1 to state /// Go from state it1 to state
// The path will be build from state. So we must find an edge from // The path will be build from state. So we must find an edge from
// state to it1, that will be reversely // state to it1, that will be reversely
for (Neighbors_t::const_iterator it = n.begin (); it != n.end (); ++it) for (Neighbors_t::const_iterator it = n.begin (); it != n.end (); ++it)
if (it->second->to () == *it1) if (it->second->stateTo () == *it1)
nn.insert (it->second, it->first); nn.insert (it->second, it->first);
} else { } else {
States_t::const_iterator it1 = stateList_.begin (); States_t::const_iterator it1 = stateList_.begin ();
...@@ -118,7 +118,8 @@ namespace hpp { ...@@ -118,7 +118,8 @@ namespace hpp {
for (Neighbors_t::const_iterator it = n.begin (); it != n.end (); ++it) for (Neighbors_t::const_iterator it = n.begin (); it != n.end (); ++it)
/// You stay in the same state /// You stay in the same state
/// or go from state to state it1 /// or go from state to state it1
if (it->second->to () == state || it->second->to () == *it1) if (it->second->stateTo () == state ||
it->second->stateTo () == *it1)
nn.insert (it->second, it->first); nn.insert (it->second, it->first);
} }
if (nn.size () > 0 && nn.totalWeight() > 0) if (nn.size () > 0 && nn.totalWeight() > 0)
......
...@@ -40,12 +40,12 @@ namespace hpp { ...@@ -40,12 +40,12 @@ namespace hpp {
Edges_t edges; Edges_t edges;
for (graph::Neighbors_t::const_iterator it = from->neighbors ().begin (); for (graph::Neighbors_t::const_iterator it = from->neighbors ().begin ();
it != from->neighbors ().end (); ++it) { it != from->neighbors ().end (); ++it) {
if (it->second->to () == to) if (it->second->stateTo () == to)
edges.push_back (it->second); edges.push_back (it->second);
} }
for (Edges_t::const_iterator it = from->hiddenNeighbors ().begin (); for (Edges_t::const_iterator it = from->hiddenNeighbors ().begin ();
it != from->hiddenNeighbors ().end (); ++it) { it != from->hiddenNeighbors ().end (); ++it) {
if ((*it)->to () == to) if ((*it)->stateTo () == to)
edges.push_back (*it); edges.push_back (*it);
} }
return edges; return edges;
...@@ -70,8 +70,8 @@ namespace hpp { ...@@ -70,8 +70,8 @@ namespace hpp {
} }
Configuration_t q0 = current->initial(); Configuration_t q0 = current->initial();
Configuration_t q1 = current->end (); Configuration_t q1 = current->end ();
StatePtr_t src = c->edge()->from(); StatePtr_t src = c->edge()->stateFrom();
StatePtr_t dst = c->edge()->to (); StatePtr_t dst = c->edge()->stateTo ();
if (src == dst) continue; if (src == dst) continue;
bool q0_in_src = src->contains(q0); bool q0_in_src = src->contains(q0);
......
...@@ -91,8 +91,8 @@ namespace hpp { ...@@ -91,8 +91,8 @@ namespace hpp {
// The path should always go through the start and end states of the // The path should always go through the start and end states of the
// transition. // transition.
assert(!HPP_DYNAMIC_PTR_CAST(graph::WaypointEdge, transition)); assert(!HPP_DYNAMIC_PTR_CAST(graph::WaypointEdge, transition));
graph::StatePtr_t from = transition->from(); graph::StatePtr_t from = transition->stateFrom();
graph::StatePtr_t to = transition->to(); graph::StatePtr_t to = transition->stateTo();
graph::StatePtr_t from2 = from, to2 = to; graph::StatePtr_t from2 = from, to2 = to;
Configuration_t q0 = path->initial (), Configuration_t q0 = path->initial (),
...@@ -120,7 +120,8 @@ namespace hpp { ...@@ -120,7 +120,8 @@ namespace hpp {
if (use_direct) { if (use_direct) {
// Nominal case // Nominal case
if (transition->state() != to) { if (transition->state() != to) {
constrainEndIntoState (path, i, splines[i], transition->to(), lc); constrainEndIntoState (path, i, splines[i], transition->stateTo(),
lc);
} }
stateOfStart = to; stateOfStart = to;
} else if (use_reverse) { } else if (use_reverse) {
......
...@@ -91,7 +91,7 @@ namespace hpp { ...@@ -91,7 +91,7 @@ namespace hpp {
std::size_t i; // index in parent state_with_depths_t std::size_t i; // index in parent state_with_depths_t
inline state_with_depth () : s(), e(), l(0), i (0) {} inline state_with_depth () : s(), e(), l(0), i (0) {}
inline state_with_depth (EdgePtr_t _e, std::size_t _l, std::size_t _i) inline state_with_depth (EdgePtr_t _e, std::size_t _l, std::size_t _i)
: s(_e->from()), e(_e), l(_l), i (_i) {} : s(_e->stateFrom()), e(_e), l(_l), i (_i) {}
}; };
typedef std::vector<state_with_depth> state_with_depths_t; typedef std::vector<state_with_depth> state_with_depths_t;
typedef std::map<StatePtr_t,state_with_depths_t> StateMap_t; typedef std::map<StatePtr_t,state_with_depths_t> StateMap_t;
...@@ -131,7 +131,7 @@ namespace hpp { ...@@ -131,7 +131,7 @@ namespace hpp {
// Insert state to if necessary // Insert state to if necessary
StateMap_t::iterator next = parent1.insert ( StateMap_t::iterator next = parent1.insert (
StateMap_t::value_type( StateMap_t::value_type(
transition->to(), state_with_depths_t () transition->stateTo(), state_with_depths_t ()
)).first; )).first;
next->second.push_back ( next->second.push_back (
...@@ -233,7 +233,7 @@ namespace hpp { ...@@ -233,7 +233,7 @@ namespace hpp {
d.addParent (_state, transition) d.addParent (_state, transition)
); );
done = done || (transition->to() == d.s2); done = done || (transition->stateTo() == d.s2);
} }
if (done) break; if (done) break;
} }
...@@ -475,7 +475,7 @@ namespace hpp { ...@@ -475,7 +475,7 @@ namespace hpp {
graph::GraphPtr_t cg (problem_.constraintGraph ()); graph::GraphPtr_t cg (problem_.constraintGraph ());
// Fill solvers with graph, node and edge constraints // Fill solvers with graph, node and edge constraints
for (std::size_t j = 0; j < d.N; ++j) { for (std::size_t j = 0; j < d.N; ++j) {
graph::StatePtr_t state (transitions [(std::size_t)j]->to ()); graph::StatePtr_t state (transitions [(std::size_t)j]->stateTo ());
// initialize solver with state constraints // initialize solver with state constraints
d.solvers [(std::size_t)j] = state->configConstraint ()-> d.solvers [(std::size_t)j] = state->configConstraint ()->
configProjector ()->solver (); configProjector ()->solver ();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment