浏览代码

Merge pull request #1460 from dsnopek/misc-backports

[4.2] Backport miscellaneous changes that can't be cherry-picked
David Snopek 1 年之前
父节点
当前提交
b28098e76b
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 0 1
      include/godot_cpp/classes/wrapped.hpp
  2. 2 0
      include/godot_cpp/core/method_bind.hpp

+ 0 - 1
include/godot_cpp/classes/wrapped.hpp

@@ -274,7 +274,6 @@ public:
 		if (p_instance) {                                                                                                                                                              \
 			m_class *cls = reinterpret_cast<m_class *>(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<GDExtensionPropertyInfo *>(p_list));                                                                                    \
 		}                                                                                                                                                                              \
 	}                                                                                                                                                                                  \

+ 2 - 0
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);
 	}
 };