diff --git a/gtsam/discrete/TableFactor.cpp b/gtsam/discrete/TableFactor.cpp index 63e9e5d6b4..3cfae56eca 100644 --- a/gtsam/discrete/TableFactor.cpp +++ b/gtsam/discrete/TableFactor.cpp @@ -260,7 +260,7 @@ DecisionTreeFactor TableFactor::toDecisionTreeFactor() const { ss << keyValueForIndex(key, i); } // k will be in reverse key order already - uint64_t k = std::strtoull(ss.str().c_str(), NULL, 10); + uint64_t k = std::stoll(ss.str().c_str()); pair_table.push_back(std::make_pair(k, sparse_table_.coeff(i))); }