No emplace in case of tbb

release/4.3a0
Frank Dellaert 2023-02-05 10:50:54 -08:00
parent fbc748a1a1
commit cc26756196
1 changed files with 6 additions and 2 deletions

View File

@ -209,9 +209,13 @@ struct EliminationData {
// Fill nodes index - we do this here instead of calling insertRoot at the end to avoid
// putting orphan subtrees in the index - they'll already be in the index of the ISAM2
// object they're added to.
for (const Key& j: myData.bayesTreeNode->conditional()->frontals())
for (const Key& j : myData.bayesTreeNode->conditional()->frontals()) {
#ifdef GTSAM_USE_TBB
nodesIndex_.insert({j, myData.bayesTreeNode});
#else
nodesIndex_.emplace(j, myData.bayesTreeNode);
#endif
}
// Store remaining factor in parent's gathered factors
if (!eliminationResult.second->empty()) {
#ifdef GTSAM_USE_TBB