From d53b48cf80364649e63e34dddaa0de3cc4f63617 Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Mon, 27 Jan 2025 09:38:57 -0500 Subject: [PATCH] Don't use c99 feature :-/ --- gtsam/discrete/DiscreteSearch.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gtsam/discrete/DiscreteSearch.cpp b/gtsam/discrete/DiscreteSearch.cpp index 1cd2999f2..4a068d175 100644 --- a/gtsam/discrete/DiscreteSearch.cpp +++ b/gtsam/discrete/DiscreteSearch.cpp @@ -39,10 +39,8 @@ struct SearchNode { * @brief Construct the root node for the search. */ static SearchNode Root(size_t numConditionals, double bound) { - return {.assignment = DiscreteValues(), - .error = 0.0, - .bound = bound, - .nextConditional = static_cast(numConditionals) - 1}; + return {DiscreteValues(), 0.0, bound, + static_cast(numConditionals) - 1}; } struct Compare { @@ -74,10 +72,8 @@ struct SearchNode { newAssignment[key] = value; } - return {.assignment = newAssignment, - .error = error + conditional.error(newAssignment), - .bound = 0.0, - .nextConditional = nextConditional - 1}; + return {newAssignment, error + conditional.error(newAssignment), 0.0, + nextConditional - 1}; } /**