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

Final porting of functions to points and enforcement #39975

Merged
merged 17 commits into from
Apr 29, 2020

Conversation

jbytheway
Copy link
Contributor

Summary

SUMMARY: Infrastructure "Enforce that functions should not have separate x, y parameters"

Purpose of change

To improve type safety and clarity.

Working towards #32017.

Describe the solution

Convert the last few function parameters and members from separate ints to points (as detected by my clang-tidy check).

Add a new clang-tidy check to ensure that they do not return.

Describe alternatives you've considered

There was one function I have chosen to suppress rather than convert. I'm still a little torn as to whether it was the right choice.

Testing

Lots of running clang-tidy, and unit tests.

Additional context

As you can see from the commit dates on this branch, I wrote the new clang-tidy check in August. It's taken that long to work through all the warnings it raised.

This completes phase 2 of my point type safety master plan. The next phase is to convert local variables. I'm hoping that's more automatable than this phase was.

(Actually, this completion is a slight lie; I know there are at least a couple of functions remaining that the current check misses. I may deal with those first).

Copy link
Contributor

@ifreund ifreund left a comment

Choose a reason for hiding this comment

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

Thanks!

@ifreund ifreund merged commit b0c926c into CleverRaven:master Apr 29, 2020
@jbytheway jbytheway deleted the xy_api_check branch April 29, 2020 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants