From 460a9a958e2655c70eeb04bcfd775ffc4cce5ec3 Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Mon, 27 Jan 2025 23:41:35 -0500 Subject: [PATCH] Fix compilation issue --- gtsam/discrete/DiscreteJunctionTree.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtsam/discrete/DiscreteJunctionTree.cpp b/gtsam/discrete/DiscreteJunctionTree.cpp index 0c9eb10ef..e1fc2af11 100644 --- a/gtsam/discrete/DiscreteJunctionTree.cpp +++ b/gtsam/discrete/DiscreteJunctionTree.cpp @@ -51,7 +51,8 @@ struct PrintForestVisitorPre { void DiscreteJunctionTree::print(const std::string& s, const KeyFormatter& keyFormatter) const { PrintForestVisitorPre visitor(keyFormatter); - treeTraversal::DepthFirstForest(*this, std::string(s), visitor); + std::string parentString = s; + treeTraversal::DepthFirstForest(*this, parentString, visitor); } } // namespace gtsam