浏览代码

Revert "Added a check in sort_custom thats test wether the given method exists."

This reverts commit 6415454581c3ba0025da6b9bae42e060fa4e1508.

That patch was correct but Object::has_method is not a reliable way to check
if we can use the given method, as it doesn't support inner classes (#22838).
Rémi Verschelde 7 年之前
父节点
当前提交
c730957c42
共有 1 个文件被更改,包括 0 次插入1 次删除
  1. 0 1
      core/array.cpp

+ 0 - 1
core/array.cpp

@@ -258,7 +258,6 @@ struct _ArrayVariantSortCustom {
 Array &Array::sort_custom(Object *p_obj, const StringName &p_function) {
 
 	ERR_FAIL_NULL_V(p_obj, *this);
-	ERR_FAIL_COND_V(!p_obj->has_method(p_function), *this);
 
 	SortArray<Variant, _ArrayVariantSortCustom, true> avs;
 	avs.compare.obj = p_obj;