From 9afbdb9cf67e6962c1ff24f45de8fceb8649bf79 Mon Sep 17 00:00:00 2001 From: David Snopek Date: Wed, 8 May 2024 16:49:18 -0500 Subject: [PATCH] Backport miscellaneous changes that can't be cherry-picked --- include/godot_cpp/classes/wrapped.hpp | 1 - include/godot_cpp/core/method_bind.hpp | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/godot_cpp/classes/wrapped.hpp b/include/godot_cpp/classes/wrapped.hpp index 4478ba25..49f89a46 100644 --- a/include/godot_cpp/classes/wrapped.hpp +++ b/include/godot_cpp/classes/wrapped.hpp @@ -274,7 +274,6 @@ public: if (p_instance) { \ m_class *cls = reinterpret_cast(p_instance); \ cls->plist_owned.clear(); \ - /* TODO `GDExtensionClassFreePropertyList` is ill-defined, we need a non-const pointer to free this. */ \ ::godot::internal::free_c_property_list(const_cast(p_list)); \ } \ } \ diff --git a/include/godot_cpp/core/method_bind.hpp b/include/godot_cpp/core/method_bind.hpp index 4afd7b8a..eabd6ece 100644 --- a/include/godot_cpp/core/method_bind.hpp +++ b/include/godot_cpp/core/method_bind.hpp @@ -412,6 +412,7 @@ public: method = p_method; generate_argument_types(sizeof...(P)); set_argument_count(sizeof...(P)); + set_const(true); } }; @@ -578,6 +579,7 @@ public: generate_argument_types(sizeof...(P)); set_argument_count(sizeof...(P)); set_return(true); + set_const(true); } };