Skip to content
Snippets Groups Projects
Commit 05619e4f authored by vincent  lorrain's avatar vincent lorrain
Browse files

use auto for loop

parent 940cd7a4
No related branches found
No related tags found
No related merge requests found
...@@ -80,7 +80,7 @@ void FsmEdge::propagateRelativePos(void){ ...@@ -80,7 +80,7 @@ void FsmEdge::propagateRelativePos(void){
// Find elements present in both myRelativeID and nextRelativeID // Find elements present in both myRelativeID and nextRelativeID
std::set<std::size_t> idxsTotest; std::set<std::size_t> idxsTotest;
for (std::size_t idx : nextRelativeID){ for (auto idx : nextRelativeID){
if (myRelativeID.find(idx) != myRelativeID.end()){ if (myRelativeID.find(idx) != myRelativeID.end()){
if (std::abs(getRelative().at(idx) - nextEdge->getRelative().at(idx)) != 1) { if (std::abs(getRelative().at(idx) - nextEdge->getRelative().at(idx)) != 1) {
throw std::runtime_error("Bad relative"); throw std::runtime_error("Bad relative");
...@@ -93,7 +93,7 @@ void FsmEdge::propagateRelativePos(void){ ...@@ -93,7 +93,7 @@ void FsmEdge::propagateRelativePos(void){
// this edge have more relative info than the next // this edge have more relative info than the next
std::map<size_t,int> tmpRelative; std::map<size_t,int> tmpRelative;
// we push this info to the next // we push this info to the next
for(std::size_t idxToPush :idxsToPush ){ for(auto idxToPush :idxsToPush ){
tmpRelative.insert( std::make_pair(idxToPush, getRelative().at(idxToPush) +1)); tmpRelative.insert( std::make_pair(idxToPush, getRelative().at(idxToPush) +1));
} }
if(tmpRelative.size() != 0){ if(tmpRelative.size() != 0){
...@@ -104,7 +104,7 @@ void FsmEdge::propagateRelativePos(void){ ...@@ -104,7 +104,7 @@ void FsmEdge::propagateRelativePos(void){
// the next node have more info than me i need to get it // the next node have more info than me i need to get it
for( std::size_t idxToGet :idxsToGet ){ for(auto idxToGet :idxsToGet ){
tmpRelative.insert( std::make_pair(idxToGet, nextEdge->getRelative().at(idxToGet) -1)); tmpRelative.insert( std::make_pair(idxToGet, nextEdge->getRelative().at(idxToGet) -1));
} }
if(tmpRelative.size() != 0){ if(tmpRelative.size() != 0){
......
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