From 5b18f05656ef1daab87f0e79db0eb7c4db7f48b6 Mon Sep 17 00:00:00 2001 From: Tomas Jurov Date: Sat, 17 May 2025 21:55:23 +0200 Subject: [PATCH] =?UTF-8?q?=C2=96In=20a=20similar=20way,=20add=20Multi=20R?= =?UTF-8?q?obotKeyFormatter=20as=20an=20external=20variable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gtsam/inference/Key.cpp | 1 + gtsam/inference/Key.h | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gtsam/inference/Key.cpp b/gtsam/inference/Key.cpp index 15d633eeb..073a545c3 100644 --- a/gtsam/inference/Key.cpp +++ b/gtsam/inference/Key.cpp @@ -28,6 +28,7 @@ namespace gtsam { /// Assign default key formatter KeyFormatter DefaultKeyFormatter = &_defaultKeyFormatter; +KeyFormatter MultiRobotKeyFormatter = &_multirobotKeyFormatter; /* ************************************************************************* */ string _defaultKeyFormatter(Key key) { diff --git a/gtsam/inference/Key.h b/gtsam/inference/Key.h index a02d018f5..59f5ecf50 100644 --- a/gtsam/inference/Key.h +++ b/gtsam/inference/Key.h @@ -57,8 +57,7 @@ GTSAM_EXPORT std::string _multirobotKeyFormatter(gtsam::Key key); /// formatter in print functions. /// /// Checks for LabeledSymbol, Symbol and then plain keys, in order. -static const gtsam::KeyFormatter MultiRobotKeyFormatter = - &_multirobotKeyFormatter; +extern GTSAM_EXPORT KeyFormatter MultiRobotKeyFormatter; /// To use the key_formatter on Keys, they must be wrapped in a StreamedKey. struct StreamedKey {