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

Converter: Rename 3.x Vector2 clamped to limit_length #73971

Merged
merged 1 commit into from
Feb 26, 2023

Conversation

tlobig
Copy link
Contributor

@tlobig tlobig commented Feb 26, 2023

Doc already said for 3.5 clamped is deprecated and limit_lenght should be used, clamp is the wrong function

@@ -579,7 +579,7 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = {
// Remember to add them to the builtin_types_excluded_functions variable, because for now these functions cannot be listed.
// { "empty", "is_empty" }, // Array -- Used as custom rule. Be careful, this will be used everywhere.
// { "remove", "remove_at" }, // Array -- Breaks Directory and several more.
{ "clamped", "clamp" }, // Vector2 -- Be careful, this will be used everywhere.
{ "clamped", "limit_length" }, // Vector2 -- Doc already said for 3.5 clamped is deprecated and limit_lenght should be used
Copy link
Member

Choose a reason for hiding this comment

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

The comment (and the commit message) has a typo, but I'd simply remove it, it's the correct rename and doesn't require justification in the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you for the input, I reverted the comment to what it was previously. I am 100% sure the rename is correct after this change, but would expect to get confirmation from anyone else

@akien-mga akien-mga changed the title tiny fix - Vector2 clamped should be renamed to limit_lenght instead of clamp Converter: Rename 3.x Vector2 clamped to limit_length Feb 26, 2023
@akien-mga akien-mga added this to the 4.0 milestone Feb 26, 2023
@akien-mga
Copy link
Member

Looks good! Could you squash the commits? See PR workflow for instructions.

@tlobig
Copy link
Contributor Author

tlobig commented Feb 26, 2023

happy to oblidge

@akien-mga
Copy link
Member

The CI failed due to a workaround that needed to be updated, so I amended the commit to fix it up, and also added the missing C# conversion.

@akien-mga akien-mga merged commit 303430e into godotengine:master Feb 26, 2023
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

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.

2 participants