From a49ed61a58ed0d0dce076a11565de076d98bd09d Mon Sep 17 00:00:00 2001 From: Clark Taylor Date: Mon, 15 Jul 2019 20:19:00 -0400 Subject: [PATCH] Reducing errors in check* libraries when compiling --- gtsam/inference/tests/testKey.cpp | 4 ++-- gtsam/inference/tests/testLabeledSymbol.cpp | 4 ++-- gtsam/inference/tests/testSymbol.cpp | 4 ++-- timing/timeGaussianFactorGraph.cpp | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gtsam/inference/tests/testKey.cpp b/gtsam/inference/tests/testKey.cpp index fcdb5709b..a60258581 100644 --- a/gtsam/inference/tests/testKey.cpp +++ b/gtsam/inference/tests/testKey.cpp @@ -76,7 +76,7 @@ TEST(Key, ChrTest) { /* ************************************************************************* */ // A custom (nonsensical) formatter. -string myFormatter(Key key) { +string keyMyFormatter(Key key) { return "special"; } @@ -91,7 +91,7 @@ TEST(Key, Formatting) { // use key_formatter with a function pointer stringstream ss2; - ss2 << key_formatter(myFormatter) << StreamedKey(key); + ss2 << key_formatter(keyMyFormatter) << StreamedKey(key); EXPECT("special" == ss2.str()); // use key_formatter with a function object. diff --git a/gtsam/inference/tests/testLabeledSymbol.cpp b/gtsam/inference/tests/testLabeledSymbol.cpp index 2a56b39c2..4ac171c73 100644 --- a/gtsam/inference/tests/testLabeledSymbol.cpp +++ b/gtsam/inference/tests/testLabeledSymbol.cpp @@ -81,7 +81,7 @@ TEST(LabeledSymbol, ChrTest) { /* ************************************************************************* */ // A custom (nonsensical) formatter. -string myFormatter(Key key) { +string labeledSymbolMyFormatter(Key key) { return "special"; } @@ -90,7 +90,7 @@ TEST(LabeledSymbol, Formatting) { // use key_formatter with a function pointer stringstream ss2; - ss2 << key_formatter(myFormatter) << symbol; + ss2 << key_formatter(labeledSymbolMyFormatter) << symbol; EXPECT("special" == ss2.str()); // use key_formatter with a function object. diff --git a/gtsam/inference/tests/testSymbol.cpp b/gtsam/inference/tests/testSymbol.cpp index 43a0e219a..bedd69044 100644 --- a/gtsam/inference/tests/testSymbol.cpp +++ b/gtsam/inference/tests/testSymbol.cpp @@ -23,7 +23,7 @@ using namespace gtsam; /* ************************************************************************* */ // A custom (nonsensical) formatter. -string myFormatter(Key key) { +string symbolMyFormatter(Key key) { return "special"; } @@ -32,7 +32,7 @@ TEST(Symbol, Formatting) { // use key_formatter with a function pointer stringstream ss2; - ss2 << key_formatter(myFormatter) << symbol; + ss2 << key_formatter(symbolMyFormatter) << symbol; EXPECT("special" == ss2.str()); // use key_formatter with a function object. diff --git a/timing/timeGaussianFactorGraph.cpp b/timing/timeGaussianFactorGraph.cpp index 1efdb9542..3258edb49 100644 --- a/timing/timeGaussianFactorGraph.cpp +++ b/timing/timeGaussianFactorGraph.cpp @@ -153,13 +153,13 @@ TEST(timeGaussianFactorGraph, linearTime) // Switch to 100*100 grid = 10K poses // 1879: 15.6498 15.3851 15.5279 -int size = 100; +int grid_size = 100; /* ************************************************************************* */ TEST(timeGaussianFactorGraph, planar_old) { cout << "Timing planar - original version" << endl; - double time = timePlanarSmoother(size); + double time = timePlanarSmoother(grid_size); cout << "timeGaussianFactorGraph : " << time << endl; //DOUBLES_EQUAL(5.97,time,0.1); } @@ -168,7 +168,7 @@ TEST(timeGaussianFactorGraph, planar_old) TEST(timeGaussianFactorGraph, planar_new) { cout << "Timing planar - new version" << endl; - double time = timePlanarSmoother(size, false); + double time = timePlanarSmoother(grid_size, false); cout << "timeGaussianFactorGraph : " << time << endl; //DOUBLES_EQUAL(5.97,time,0.1); } @@ -177,7 +177,7 @@ TEST(timeGaussianFactorGraph, planar_new) TEST(timeGaussianFactorGraph, planar_eliminate_old) { cout << "Timing planar Eliminate - original version" << endl; - double time = timePlanarSmootherEliminate(size); + double time = timePlanarSmootherEliminate(grid_size); cout << "timeGaussianFactorGraph : " << time << endl; //DOUBLES_EQUAL(5.97,time,0.1); } @@ -186,7 +186,7 @@ TEST(timeGaussianFactorGraph, planar_eliminate_old) TEST(timeGaussianFactorGraph, planar_eliminate_new) { cout << "Timing planar Eliminate - new version" << endl; - double time = timePlanarSmootherEliminate(size, false); + double time = timePlanarSmootherEliminate(grid_size, false); cout << "timeGaussianFactorGraph : " << time << endl; //DOUBLES_EQUAL(5.97,time,0.1); }