Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CallableCustom comparison function handling
In the GDExtension API the CallableCustom interface defines the `hash_func`, `equal_func`, and `less_than_func` methods as optional. However, in godot-cpp a custom handler was always provided to Godot. This custom provider then failed if both Callables had specified nullptr as their equal or less_than_equal comparison function. This commit fixes this, and only sets the custom handler, when a custom handler is actually specified by the developer. Also, if the hash() function returns 0, then no hash function is provided to Godot, so it falls back to its default hash function.
- Loading branch information