diff --git a/src/graph/edge.cc b/src/graph/edge.cc index 6cad6c047a68314a49e51e54bb5d16a645026bbf..4c463db8a964d6d6393ae7a85a2eb28141713623 100644 --- a/src/graph/edge.cc +++ b/src/graph/edge.cc @@ -315,7 +315,7 @@ namespace hpp { vector_t offset = cp->offsetFromConfig (q_offset); size_t row = 0, nbRows = 0; for (DifferentiableFunctions_t::const_iterator it = extraNumericalFunctions_.begin (); - it != extraNumericalFunctions_.end (); it++) { + it != extraNumericalFunctions_.end (); ++it) { const core::DifferentiableFunction& f = *(it->first); nbRows = f.outputSize (); vector_t value = vector_t::Zero (nbRows); @@ -328,7 +328,7 @@ namespace hpp { cp->offset (offset); } for (LockedDofs_t::const_iterator it = extraLockedDofs_.begin (); - it != extraLockedDofs_.end (); it++) { + it != extraLockedDofs_.end (); ++it) { (*it)->offsetFromConfig (levelsetTarget); } @@ -371,14 +371,14 @@ namespace hpp { if (!extraNumericalFunctions_.empty ()) { ConfigProjectorPtr_t proj = ConfigProjector::create(g->robot(), "proj_" + n, g->errorThreshold(), g->maxIterations()); for (DifferentiableFunctions_t::const_iterator it = extraNumericalFunctions_.begin (); - it != extraNumericalFunctions_.end (); it++) { + it != extraNumericalFunctions_.end (); ++it) { proj->addConstraint (it->first); } constraint->addConstraint (proj); } for (LockedDofs_t::const_iterator it = extraLockedDofs_.begin (); - it != extraLockedDofs_.end (); it++) + it != extraLockedDofs_.end (); ++it) constraint->addConstraint (*it); hist_ = graph::LeafHistogramPtr_t (new graph::LeafHistogram (constraint)); @@ -401,7 +401,7 @@ namespace hpp { ConfigProjectorPtr_t proj = ConfigProjector::create(g->robot(), "proj_" + n, g->errorThreshold(), g->maxIterations()); bool gHasDiffFunc = g->insertNumericalConstraints (proj); for (DifferentiableFunctions_t::const_iterator it = extraNumericalFunctions_.begin (); - it != extraNumericalFunctions_.end (); it++) { + it != extraNumericalFunctions_.end (); ++it) { proj->addConstraint (it->first, it->second); } if (gHasDiffFunc | !extraNumericalFunctions_.empty () @@ -411,7 +411,7 @@ namespace hpp { g->insertLockedDofs (constraint); for (LockedDofs_t::const_iterator it = extraLockedDofs_.begin (); - it != extraLockedDofs_.end (); it++) { + it != extraLockedDofs_.end (); ++it) { constraint->addConstraint (*it); } insertLockedDofs (constraint); diff --git a/src/graph/graph-component.cc b/src/graph/graph-component.cc index 98a3f4fd0537919e1c57198a2576290e6d7aca12..e7b6f36dfd526761b4ffad405edb09c236b823ca 100644 --- a/src/graph/graph-component.cc +++ b/src/graph/graph-component.cc @@ -79,7 +79,7 @@ namespace hpp { bool GraphComponent::insertNumericalConstraints (ConfigProjectorPtr_t& proj) const { for (DifferentiableFunctions_t::const_iterator it = numericalConstraints_.begin(); - it != numericalConstraints_.end(); it++) + it != numericalConstraints_.end(); ++it) proj->addConstraint (it->first, it->second); return !numericalConstraints_.empty (); } @@ -87,7 +87,7 @@ namespace hpp { bool GraphComponent::insertLockedDofs (ConstraintSetPtr_t cs) const { for (LockedDofs_t::const_iterator it = lockedDofConstraints_.begin(); - it != lockedDofConstraints_.end(); it++) + it != lockedDofConstraints_.end(); ++it) cs->addConstraint (*it); return !lockedDofConstraints_.empty (); } diff --git a/src/graph/graph.cc b/src/graph/graph.cc index 11eff65fe6f5cdd0096577ada5b223309318106d..5f42a22f21e2d01c65c84bfd4f28ad079b32d8e5 100644 --- a/src/graph/graph.cc +++ b/src/graph/graph.cc @@ -81,7 +81,7 @@ namespace hpp { { Edges_t edges; for (Neighbors_t::const_iterator it = from->neighbors ().begin (); - it != from->neighbors ().end (); it++) { + it != from->neighbors ().end (); ++it) { if (it->second->to () == to) edges.push_back (it->second); } diff --git a/src/graph/node-selector.cc b/src/graph/node-selector.cc index a30d88913c3da67948298cb4b3b937df9cccc732..2b7e15e29d87e9a4ae36d5d44cd50c35d6e36fb4 100644 --- a/src/graph/node-selector.cc +++ b/src/graph/node-selector.cc @@ -47,7 +47,7 @@ namespace hpp { NodePtr_t NodeSelector::getNode(const Configuration_t config) const { for (Nodes_t::const_iterator it = orderedStates_.begin(); - orderedStates_.end() != it; it++) + orderedStates_.end() != it; ++it) if ((*it)->contains(config)) return *it; throw std::logic_error ("A configuration has no node"); @@ -62,7 +62,7 @@ namespace hpp { std::ostream& NodeSelector::dotPrint (std::ostream& os) const { for (Nodes_t::const_iterator it = orderedStates_.begin(); - orderedStates_.end() != it; it++) + orderedStates_.end() != it; ++it) (*it)->dotPrint (os); return os; } @@ -72,7 +72,7 @@ namespace hpp { os << "|-- "; GraphComponent::print (os) << std::endl; for (Nodes_t::const_iterator it = orderedStates_.begin(); - orderedStates_.end() != it; it++) + orderedStates_.end() != it; ++it) os << *(*it); return os; } diff --git a/src/graph/node.cc b/src/graph/node.cc index 326e4ddfc6c7d907eb10900109e308c43fb1806f..0355e42288f343d3864ef53099fdd033c081f324 100644 --- a/src/graph/node.cc +++ b/src/graph/node.cc @@ -62,7 +62,7 @@ namespace hpp { { os << id () << " [label=\"" << name () << "\"];" << std::endl; for (Neighbors_t::const_iterator it = neighbors_.begin(); - it != neighbors_.end(); it++) + it != neighbors_.end(); ++it) it->second->dotPrint (os) << std::endl; return os; } @@ -72,7 +72,7 @@ namespace hpp { os << "| |-- "; GraphComponent::print (os) << std::endl; for (Neighbors_t::const_iterator it = neighbors_.begin(); - it != neighbors_.end(); it++) + it != neighbors_.end(); ++it) os << *(it->second) << " - " << it->first << std::endl; return os; } diff --git a/src/graph/statistics.cc b/src/graph/statistics.cc index edfd61c646edb44d926d6ac93273c0c90a027ca7..88568ded71ddccc30561d206f4f0f755341bd5b4 100644 --- a/src/graph/statistics.cc +++ b/src/graph/statistics.cc @@ -57,10 +57,10 @@ namespace hpp { NodesList_t l; bool found; for (RoadmapNodes_t::const_iterator itn = nodes_.begin (); - itn != nodes_.end (); itn++) { + itn != nodes_.end (); ++itn) { found = false; for (NodesList_t::iterator itc = l.begin (); - itc != l.end (); itc++) { + itc != l.end (); ++itc) { if ((*itn)->connectedComponent () == itc->front ()->connectedComponent ()) { itc->push_back (*itn); found = true; @@ -72,7 +72,7 @@ namespace hpp { } } for (NodesList_t::iterator itc = l.begin (); - itc != l.end (); itc++) + itc != l.end (); ++itc) os << itc->front ()->connectedComponent () << " - " << itc->size () << ", "; return os << ")."; } @@ -122,10 +122,10 @@ namespace hpp { NodesList_t l; bool found; for (RoadmapNodes_t::const_iterator itn = roadmapNodes_.begin (); - itn != roadmapNodes_.end (); itn++) { + itn != roadmapNodes_.end (); ++itn) { found = false; for (NodesList_t::iterator itc = l.begin (); - itc != l.end (); itc++) { + itc != l.end (); ++itc) { if ((*itn)->connectedComponent () == itc->front ()->connectedComponent ()) { itc->push_back (*itn); found = true; @@ -137,7 +137,7 @@ namespace hpp { } } for (NodesList_t::iterator itc = l.begin (); - itc != l.end (); itc++) + itc != l.end (); ++itc) os << itc->front ()->connectedComponent () << " - " << itc->size () << ", "; return os << ")."; } @@ -209,7 +209,7 @@ namespace hpp { { unsigned int count = 0; for (RoadmapNodes_t::const_iterator it = nodes_.begin (); - it != nodes_.end (); it++) + it != nodes_.end (); ++it) if ((*it)->connectedComponent () != cc) count++; return count; @@ -219,7 +219,7 @@ namespace hpp { const core::ConnectedComponentPtr_t& cc) const { statistics::DiscreteDistribution < core::NodePtr_t > distrib; - for (const_iterator bin = begin(); bin != end (); bin++) { + for (const_iterator bin = begin(); bin != end (); ++bin) { unsigned int w = bin->numberOfObsOutOfConnectedComponent (cc); if (w == 0) continue; diff --git a/src/manipulation-planner.cc b/src/manipulation-planner.cc index d76e951f5f6d7dd173c64f0cb5e55cf0d01c6032..3fe36ae9914fd7e0f91ebfa16f0af81984488802 100644 --- a/src/manipulation-planner.cc +++ b/src/manipulation-planner.cc @@ -64,7 +64,7 @@ namespace hpp { // Extend each connected component for (core::ConnectedComponents_t::const_iterator itcc = roadmap ()->connectedComponents ().begin (); - itcc != roadmap ()->connectedComponents ().end (); itcc++) { + itcc != roadmap ()->connectedComponents ().end (); ++itcc) { // Find the nearest neighbor. core::value_type distance; core::NodePtr_t near = roadmap ()->nearestNode (q_rand, *itcc, distance); @@ -160,11 +160,11 @@ namespace hpp { connectSucceed = false; for (core::ConnectedComponents_t::const_iterator itcc = roadmap ()->connectedComponents ().begin (); - itcc != roadmap ()->connectedComponents ().end (); itcc++) { + itcc != roadmap ()->connectedComponents ().end (); ++itcc) { if (*itcc == (*itn1)->connectedComponent ()) continue; for (core::Nodes_t::const_iterator itn2 = (*itcc)->nodes().begin (); - itn2 != (*itcc)->nodes ().end (); itn2 ++) { + itn2 != (*itcc)->nodes ().end (); ++itn2) { ConfigurationPtr_t q2 ((*itn2)->configuration ()); assert (*q1 != *q2); path = (*sm) (*q1, *q2); diff --git a/src/problem-solver.cc b/src/problem-solver.cc index 49a99be77cf5306d5de3b80da1f9141204981b24..3df761215c5f21dafc11c21972535d85bfe3f5fe 100644 --- a/src/problem-solver.cc +++ b/src/problem-solver.cc @@ -136,14 +136,14 @@ namespace hpp { "Default constraint set"); GraspsMap_t graspsMap = grasps(); for (GraspsMap_t::const_iterator itGrasp = graspsMap.begin(); - itGrasp != graspsMap.end() ; itGrasp++) { + itGrasp != graspsMap.end(); ++itGrasp) { GraspPtr_t grasp = itGrasp->second; GripperPtr_t gripper = grasp->first; HandlePtr_t handle = grasp->second; JointPtr_t joint = handle->joint(); model::JointVector_t joints = gripper->getDisabledCollisions(); for (model::JointVector_t::iterator itJoint = joints.begin() ; - itJoint != joints.end() ; itJoint++ ) { + itJoint != joints.end(); ++itJoint) { robot()->addCollisionPairs(joint, *itJoint, hpp::model::COLLISION); robot()->addCollisionPairs(joint, *itJoint, hpp::model::DISTANCE); } @@ -162,7 +162,7 @@ namespace hpp { JointPtr_t joint1 = handle->joint(); model::JointVector_t joints = gripper->getDisabledCollisions(); for (model::JointVector_t::iterator itJoint = joints.begin() ; - itJoint != joints.end() ; itJoint++ ) { + itJoint != joints.end(); ++itJoint++) { robot()->removeCollisionPairs(joint1, *itJoint, hpp::model::COLLISION); robot()->removeCollisionPairs(joint1, *itJoint, diff --git a/src/roadmap.cc b/src/roadmap.cc index 46a382390da5234ab8ff91efb35a4d3876fd3b92..6920d39e938f510dcfa77121ecd8c747398ae23d 100644 --- a/src/roadmap.cc +++ b/src/roadmap.cc @@ -33,7 +33,7 @@ namespace hpp { Parent::clear (); Histograms newHistograms; Histograms::iterator it; - for (it = histograms_.begin(); it != histograms_.end(); it++) { + for (it = histograms_.begin(); it != histograms_.end(); ++it) { newHistograms.push_back ((*it)->clone ()); } histograms_ = newHistograms; @@ -48,7 +48,7 @@ namespace hpp { void Roadmap::statInsert (const core::NodePtr_t& n) { Histograms::iterator it; - for (it = histograms_.begin(); it != histograms_.end(); it++) { + for (it = histograms_.begin(); it != histograms_.end(); ++it) { (*it)->add (n); } } @@ -70,7 +70,7 @@ namespace hpp { if (HPP_DYNAMIC_PTR_CAST (graph::NodeHistogram, *it)) it = histograms_.erase (it); else - it++; + ++it; } insertHistogram (graph::HistogramPtr_t (new graph::NodeHistogram (graph))); } diff --git a/src/robot.cc b/src/robot.cc index 8645fdaa726b52d99154e3f95c7a5f483caefde2..ffc8484fb37f930cfba2d8df41d17ba177ea802d 100644 --- a/src/robot.cc +++ b/src/robot.cc @@ -77,11 +77,11 @@ namespace hpp { { std::vector<std::string> deviceNames; for ( Devices_t::iterator itDevice = robots_.begin() ; itDevice != - robots_.end() ; itDevice++ ) { + robots_.end(); ++itDevice) { deviceNames.push_back((*itDevice)->name()); } for ( Objects_t::iterator itObject = objects_.begin() ; itObject != - objects_.end() ; itObject++ ) { + objects_.end(); ++itObject) { deviceNames.push_back((*itObject)->name()); } return deviceNames; @@ -142,7 +142,7 @@ namespace hpp { gripper->removeAllDisabledCollisions(); JointVector_t joints = (*itGripper)->getDisabledCollisions(); for (model::JointVector_t::const_iterator itJoint = joints.begin() ; - itJoint != joints.end() ; itJoint++ ) { + itJoint != joints.end(); ++itJoint) { gripper->addDisabledCollision(jointMap_[*itJoint]); } addGripper (gripper->name (), gripper); @@ -239,7 +239,7 @@ namespace hpp { JointVector_t joints = device->getJointVector (); // Cycle through all joint pairs for (JointVector_t::const_iterator it1 = joints.begin (); - it1 != joints.end (); it1++) { + it1 != joints.end (); ++it1) { JointPtr_t joint1 = jointMap_[*it1]; hpp::model::Body* body1 = joint1->linkedBody (); if (!body1) { @@ -247,7 +247,7 @@ namespace hpp { " has no hpp::model::Body."); } else { for (JointVector_t::const_iterator it2 = getJointVector().begin (); - *it2 != jointMap_[*(joints.begin())]; it2++) { + *it2 != jointMap_[*(joints.begin())]; ++it2) { JointPtr_t joint2 = *it2; hpp::model::Body* body2 = joint2->linkedBody (); if (!body2) { diff --git a/tests/test-constraintgraph.cc b/tests/test-constraintgraph.cc index 48b77f6d33d08ef33cc5739f2f7728a7b9635996..8351e6c8a03552c9310eeda0ae461c0488b93c27 100644 --- a/tests/test-constraintgraph.cc +++ b/tests/test-constraintgraph.cc @@ -91,7 +91,7 @@ BOOST_AUTO_TEST_CASE (GraphStructure) // Check that GraphComponent keeps track of all object properly. size_t index = 0; for (GraphComponents::iterator it = components.begin(); - it != components.end(); it++) { + it != components.end(); ++it) { BOOST_CHECK_MESSAGE (*it == GraphComponent::get (index).lock(), "GraphComponent class do not track properly GraphComponents inherited objects"); index++;