Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase the number of arguments accepted by UndoRedo methods #50206

Merged
merged 1 commit into from
Jul 20, 2021

Conversation

groud
Copy link
Member

@groud groud commented Jul 6, 2021

I originally wanted to implement that using variadic templates/parameter packs, but all solutions I could find have significant drawbacks. I instead went the easy route by increasing the number of accepted arguments.

For the details about why variable arguments of the same types have drawback, see this: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1219r0.html

This blog also has 3 blog posts about the issue:
https://www.fluentcpp.com/2019/01/25/variadic-number-function-parameters-type/
https://www.fluentcpp.com/2019/01/29/how-to-define-a-variadic-number-of-arguments-of-the-same-type-part-2/
https://www.fluentcpp.com/2019/02/05/how-to-define-a-variadic-number-of-arguments-of-the-same-type-part-3/

@groud groud added this to the 4.0 milestone Jul 6, 2021
@groud groud requested a review from a team as a code owner July 6, 2021 15:12
@groud groud force-pushed the undoredo_increase_args_count branch 3 times, most recently from 435d1c3 to 4d1c44f Compare July 6, 2021 15:44
@groud groud requested review from a team as code owners July 6, 2021 15:44
@groud groud force-pushed the undoredo_increase_args_count branch from 4d1c44f to 2f9a026 Compare July 6, 2021 16:52
@groud groud requested a review from a team as a code owner July 6, 2021 16:52
Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Not sure about unintended consequences, but I can't see anything wrong.

@akien-mga akien-mga merged commit b4baec0 into godotengine:master Jul 20, 2021
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants