Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cpp/map_closures/MapClosures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ void MapClosures::MatchAndAddToDatabase(const int id,
}

ClosureCandidate MapClosures::ValidateClosure(const int reference_id, const int query_id) const {
const Tree::MatchVector &matches = descriptor_matches_.at(reference_id);
const auto it = descriptor_matches_.find(reference_id);
if (it == descriptor_matches_.end()) {
return ClosureCandidate();
}

const Tree::MatchVector &matches = it->second;
const size_t num_matches = matches.size();

ClosureCandidate closure;
Expand Down
Loading