diff --git a/gtsam/inference/JunctionTree-inst.h b/gtsam/inference/JunctionTree-inst.h index 99e11084a..b3ec1fc98 100644 --- a/gtsam/inference/JunctionTree-inst.h +++ b/gtsam/inference/JunctionTree-inst.h @@ -208,7 +208,7 @@ namespace gtsam { // putting orphan subtrees in the index - they'll already be in the index of the ISAM2 // object they're added to. BOOST_FOREACH(const Key& j, myData.bayesTreeNode->conditional()->frontals()) - nodesIndex.insert(std::make_pair(j, myData.bayesTreeNode)).second; + nodesIndex.insert(std::make_pair(j, myData.bayesTreeNode)); // Store remaining factor in parent's gathered factors if(!eliminationResult.second->empty())