Made new global functions in unit tests static to avoid duplicate symbols

release/4.3a0
Richard Roberts 2012-09-04 15:05:55 +00:00
parent 8e4f605122
commit abd07e553e
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ TEST( SubgraphPreconditioner, planarOrdering ) {
/* ************************************************************************* */ /* ************************************************************************* */
/** unnormalized error */ /** unnormalized error */
double error(const JacobianFactorGraph& fg, const VectorValues& x) { static double error(const JacobianFactorGraph& fg, const VectorValues& x) {
double total_error = 0.; double total_error = 0.;
BOOST_FOREACH(const JacobianFactor::shared_ptr& factor, fg) BOOST_FOREACH(const JacobianFactor::shared_ptr& factor, fg)
total_error += factor->error(x); total_error += factor->error(x);

View File

@ -38,7 +38,7 @@ using namespace example;
/* ************************************************************************* */ /* ************************************************************************* */
/** unnormalized error */ /** unnormalized error */
double error(const JacobianFactorGraph& fg, const VectorValues& x) { static double error(const JacobianFactorGraph& fg, const VectorValues& x) {
double total_error = 0.; double total_error = 0.;
BOOST_FOREACH(const JacobianFactor::shared_ptr& factor, fg) BOOST_FOREACH(const JacobianFactor::shared_ptr& factor, fg)
total_error += factor->error(x); total_error += factor->error(x);