diff --git a/gtsam/inference/MetisIndex-inl.h b/gtsam/inference/MetisIndex-inl.h index b9272990a..a8e9aef2f 100644 --- a/gtsam/inference/MetisIndex-inl.h +++ b/gtsam/inference/MetisIndex-inl.h @@ -42,7 +42,7 @@ void MetisIndex::augment(const FactorGraph& factors) // First: Record a copy of each key inside the factorgraph and create a // key to integer mapping. This is referenced during the adjaceny step for (size_t i = 0; i < factors.size(); i++){ - if (factors[i]) + if (factors[i]) { BOOST_FOREACH(const Key& key, *factors[i]){ keySet.insert(keySet.end(), key); // Keep a track of all unique keys if (intKeyBMap_.left.find(key) == intKeyBMap_.left.end()){ @@ -50,6 +50,7 @@ void MetisIndex::augment(const FactorGraph& factors) keyCounter++; } } + } } // Create an adjacency mapping that stores the set of all adjacent keys for every key diff --git a/gtsam/inference/Ordering.cpp b/gtsam/inference/Ordering.cpp index a069fd4f6..81f9ddb5c 100644 --- a/gtsam/inference/Ordering.cpp +++ b/gtsam/inference/Ordering.cpp @@ -227,7 +227,7 @@ namespace gtsam { } result.resize(size); - for (size_t j = 0; j < size; ++j){ + for (size_t j = 0; j < (size_t)size; ++j){ // We have to add the minKey value back to obtain the original key in the Values result[j] = met.intToKey(perm[j]); }