From 270f17005d499c7e98bd405d6743e4678a807fb5 Mon Sep 17 00:00:00 2001 From: David Sobek Date: Mon, 5 May 2025 19:04:36 -0600 Subject: [PATCH] Make BT::Any::copyInto const --- include/behaviortree_cpp/utils/safe_any.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/behaviortree_cpp/utils/safe_any.hpp b/include/behaviortree_cpp/utils/safe_any.hpp index 999e7d526..21c33e1ff 100644 --- a/include/behaviortree_cpp/utils/safe_any.hpp +++ b/include/behaviortree_cpp/utils/safe_any.hpp @@ -134,7 +134,7 @@ class Any } // copy the value (casting into dst). We preserve the destination type. - void copyInto(Any& dst); + void copyInto(Any& dst) const; // this is different from any_cast, because if allows safe // conversions between arithmetic values and from/to string. @@ -346,7 +346,7 @@ inline bool Any::isIntegral() const return _any.type() == typeid(int64_t) || _any.type() == typeid(uint64_t); } -inline void Any::copyInto(Any& dst) +inline void Any::copyInto(Any& dst) const { if(dst.empty()) {