Skip to content

Commit

Permalink
updated method bindings wrapper for cleaner autogen docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vorlac committed Oct 1, 2023
1 parent 5075af9 commit 93cf81a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/util/bind.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,12 @@ namespace rl::inline utils
else
{
const typename traits_t::arg_types func_args{};
std::vector<godot::String> vec_strs = rl::detail::to_arg_vec(func_args);
std::tuple arg_types_str{ detail::arg_vec_to_tuple<tup_size>(vec_strs) };

std::apply(
[&](auto&&... args) {
godot::ClassDB::bind_method(godot::D_METHOD(func_name.data()), Method,
args...);
},
arg_types_str);
func_args);
}
}
};
Expand Down Expand Up @@ -163,9 +160,8 @@ namespace rl::inline utils

std::apply(
[&](auto&&... arg) {
signal_params = {
variant_traits<decltype(arg)>::type_info::get_class_info()...
};
signal_params
= { variant_traits<decltype(arg)>::type_info::get_class_info()... };
},
signal_args);

Expand Down

0 comments on commit 93cf81a

Please sign in to comment.