Skip to content

Commit

Permalink
Revert "Added a check in sort_custom thats test wether the given meth…
Browse files Browse the repository at this point in the history
…od exists."

This reverts commit 6415454.

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).
  • Loading branch information
akien-mga committed Oct 9, 2018
1 parent e6cfaa1 commit c730957
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion core/array.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit c730957

Please sign in to comment.