From 58bade6aa3be19a32248efc770dd8c698e020bb9 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Thu, 25 Apr 2013 16:32:05 +0000 Subject: [PATCH] Switched constants to macros to avoid unused variable warnings --- gtsam/config.h.in | 6 ++---- gtsam/slam/dataset.cpp | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/gtsam/config.h.in b/gtsam/config.h.in index e89a31da6..1205bcf31 100644 --- a/gtsam/config.h.in +++ b/gtsam/config.h.in @@ -18,10 +18,8 @@ #pragma once // Paths to example datasets distributed with GTSAM -namespace gtsam { - static const char* SourceTreeDatasetDir = "@CMAKE_SOURCE_DIR@/examples/Data"; - static const char* InstalledDatasetDir = "@GTSAM_TOOLBOX_INSTALL_PATH@/gtsam_examples/Data"; -} +#define GTSAM_SOURCE_TREE_DATASET_DIR "@CMAKE_SOURCE_DIR@/examples/Data" +#define GTSAM_INSTALLED_DATASET_DIR "@GTSAM_TOOLBOX_INSTALL_PATH@/gtsam_examples/Data" // Whether GTSAM is compiled to use quaternions for Rot3 (otherwise uses rotation matrices) #cmakedefine GTSAM_USE_QUATERNIONS diff --git a/gtsam/slam/dataset.cpp b/gtsam/slam/dataset.cpp index 25cce20d7..6b5aeabd9 100644 --- a/gtsam/slam/dataset.cpp +++ b/gtsam/slam/dataset.cpp @@ -40,8 +40,8 @@ namespace gtsam { string findExampleDataFile(const string& name) { // Search source tree and installed location vector rootsToSearch; - rootsToSearch.push_back(SourceTreeDatasetDir); // Defined by CMake, see gtsam/gtsam/CMakeLists.txt - rootsToSearch.push_back(InstalledDatasetDir); // Defined by CMake, see gtsam/gtsam/CMakeLists.txt + rootsToSearch.push_back(GTSAM_SOURCE_TREE_DATASET_DIR); // Defined by CMake, see gtsam/gtsam/CMakeLists.txt + rootsToSearch.push_back(GTSAM_INSTALLED_DATASET_DIR); // Defined by CMake, see gtsam/gtsam/CMakeLists.txt // Search for filename as given, and with .graph and .txt extensions vector namesToSearch;