From 72fbc569a56a6a80c8291e13313150decb9d872b Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Mon, 24 Aug 2009 16:54:22 +0000 Subject: [PATCH] const correctness for combine (it is not const but takes a const argument) --- cpp/LinearFactorGraph.cpp | 2 +- cpp/LinearFactorGraph.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/LinearFactorGraph.cpp b/cpp/LinearFactorGraph.cpp index f7733e772..b8c6aa630 100644 --- a/cpp/LinearFactorGraph.cpp +++ b/cpp/LinearFactorGraph.cpp @@ -155,7 +155,7 @@ FGConfig LinearFactorGraph::optimize(const Ordering& ordering) /* ************************************************************************* */ /** combine two factor graphs */ /* ************************************************************************* */ -void LinearFactorGraph::combine(LinearFactorGraph &lfg){ +void LinearFactorGraph::combine(const LinearFactorGraph &lfg){ for(const_iterator factor=lfg.factors.begin(); factor!=lfg.factors.end(); factor++){ push_back(*factor); } diff --git a/cpp/LinearFactorGraph.h b/cpp/LinearFactorGraph.h index 04e3cd8bb..48a5414d5 100644 --- a/cpp/LinearFactorGraph.h +++ b/cpp/LinearFactorGraph.h @@ -105,7 +105,7 @@ namespace gtsam { * combine two factor graphs * @param *lfg Linear factor graph */ - void combine(LinearFactorGraph &lfg); + void combine(const LinearFactorGraph &lfg); /** * Find all variables and their dimensions