From 05619e4f368ebd840f8d14ba84bb34db28fad62a Mon Sep 17 00:00:00 2001 From: vl241552 <vincent.lorrain@cea.fr> Date: Wed, 29 Nov 2023 14:07:44 +0000 Subject: [PATCH] use auto for loop --- src/graphRegex/matchFsm/FsmEdge.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/graphRegex/matchFsm/FsmEdge.cpp b/src/graphRegex/matchFsm/FsmEdge.cpp index 374272c76..638aad3bc 100644 --- a/src/graphRegex/matchFsm/FsmEdge.cpp +++ b/src/graphRegex/matchFsm/FsmEdge.cpp @@ -80,7 +80,7 @@ void FsmEdge::propagateRelativePos(void){ // Find elements present in both myRelativeID and nextRelativeID std::set<std::size_t> idxsTotest; - for (std::size_t idx : nextRelativeID){ + for (auto idx : nextRelativeID){ if (myRelativeID.find(idx) != myRelativeID.end()){ if (std::abs(getRelative().at(idx) - nextEdge->getRelative().at(idx)) != 1) { throw std::runtime_error("Bad relative"); @@ -93,7 +93,7 @@ void FsmEdge::propagateRelativePos(void){ // this edge have more relative info than the next std::map<size_t,int> tmpRelative; // 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)); } if(tmpRelative.size() != 0){ @@ -104,7 +104,7 @@ void FsmEdge::propagateRelativePos(void){ // 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)); } if(tmpRelative.size() != 0){ -- GitLab