summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-10-09 09:52:23 +0200
committerRémi Verschelde <rverschelde@gmail.com>2018-10-09 09:53:17 +0200
commitc730957c427680b9d0d823e7240cdf614d4a8c2f (patch)
treea3872c81406b105da175def78fc0f1742f1152cb /core
parente6cfaa18cae296e441a0496b28e4ec3e0d4061ee (diff)
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).
Diffstat (limited to 'core')
-rw-r--r--core/array.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/core/array.cpp b/core/array.cpp
index 9f09ddbe15..9708452850 100644
--- a/core/array.cpp
+++ b/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;