Skip to content

Commit

Permalink
fix a bug in UpdateConnections in KeyFrame.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
fishmarch committed Jul 17, 2023
1 parent c05fff5 commit 45ea0f5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/KeyFrame.cc
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ void KeyFrame::UpdateConnections(bool upParent)
vPairs.reserve(KFcounter.size());
if(!upParent)
cout << "UPDATE_CONN: current KF " << mnId << endl;
for(map<KeyFrame*,int>::iterator mit=KFcounter.begin(), mend=KFcounter.end(); mit!=mend; mit++)
for(map<KeyFrame*,int>::iterator mit=KFcounter.begin(), mend=KFcounter.end(); mit!=mend;)
{
if(!upParent)
cout << " UPDATE_CONN: KF " << mit->first->mnId << " ; num matches: " << mit->second << endl;
Expand All @@ -437,7 +437,9 @@ void KeyFrame::UpdateConnections(bool upParent)
{
vPairs.push_back(make_pair(mit->second,mit->first));
(mit->first)->AddConnection(this,mit->second);
}
mit++;
}else
mit = KFcounter.erase(mit);
}

if(vPairs.empty())
Expand Down

0 comments on commit 45ea0f5

Please sign in to comment.