From fbef948254ab527b88a7618e72dd148c5f3416ef Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Mon, 8 Feb 2010 22:22:38 +0000 Subject: [PATCH] Bug fix in replace() --- cpp/FactorGraph-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/FactorGraph-inl.h b/cpp/FactorGraph-inl.h index f53c9970e..609e21944 100644 --- a/cpp/FactorGraph-inl.h +++ b/cpp/FactorGraph-inl.h @@ -118,7 +118,7 @@ void FactorGraph::replace(int index, sharedFactor factor) { if(factors_[index] != NULL) { // Remove this factor from its variables' index lists - BOOST_FOREACH(const Symbol& key, factor->keys()) { + BOOST_FOREACH(const Symbol& key, factors_[index]->keys()) { indices_.at(key).remove(index); } }