diff --git a/cpp/ISAM-inl.h b/cpp/ISAM-inl.h index 1bffa20cc..45fb70452 100644 --- a/cpp/ISAM-inl.h +++ b/cpp/ISAM-inl.h @@ -40,13 +40,13 @@ namespace gtsam { // create an ordering for the new and contaminated factors Ordering ordering; - if (true) { +#ifndef SORT_KEYS ordering = factors.getOrdering(); - } else { +#else list keys = factors.keys(); keys.sort(); // todo: correct sorting order? ordering = keys; - } +#endif // Create Index from ordering IndexTable index(ordering);