From 4e8fe533c8521e0e0207cfbb73e18c9d157990a4 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Thu, 15 Aug 2013 17:23:52 +0000 Subject: [PATCH] Revert "With Richard: changing from "unsafe_erase" to "erase"" This reverts commit 562bee77cc046234b19fd230c165b5e5f51a8ba3. --- gtsam/inference/BayesTree-inst.h | 4 ++-- gtsam/nonlinear/ISAM2-impl.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gtsam/inference/BayesTree-inst.h b/gtsam/inference/BayesTree-inst.h index 7a88e37f6..b3fc8cb4c 100644 --- a/gtsam/inference/BayesTree-inst.h +++ b/gtsam/inference/BayesTree-inst.h @@ -416,7 +416,7 @@ namespace gtsam { child->parent_ = typename Clique::weak_ptr(); BOOST_FOREACH(Key j, clique->conditional()->frontals()) { - nodes_.erase(j); + nodes_.unsafe_erase(j); } } @@ -495,7 +495,7 @@ namespace gtsam { // Remove this node from the nodes index BOOST_FOREACH(Key j, (*clique)->conditional()->frontals()) { - nodes_.erase(j); } + nodes_.unsafe_erase(j); } // Erase the parent and children pointers (*clique)->parent_.reset(); diff --git a/gtsam/nonlinear/ISAM2-impl.cpp b/gtsam/nonlinear/ISAM2-impl.cpp index 8da8bf29e..38c087741 100644 --- a/gtsam/nonlinear/ISAM2-impl.cpp +++ b/gtsam/nonlinear/ISAM2-impl.cpp @@ -55,7 +55,7 @@ void ISAM2::Impl::RemoveVariables(const FastSet& unusedKeys, const FastVect deltaNewton.erase(key); RgProd.erase(key); replacedKeys.erase(key); - nodes.erase(key); + nodes.unsafe_erase(key); theta.erase(key); fixedVariables.erase(key); }