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

favor type usize for variables that are primarily an array index #12

Closed
stonylohr opened this issue Jul 17, 2020 · 3 comments
Closed

favor type usize for variables that are primarily an array index #12

stonylohr opened this issue Jul 17, 2020 · 3 comments

Comments

@stonylohr
Copy link
Contributor

Type usize is required for the index into an array or slice. It is generally preferable to go ahead and use this type from the outset for variables for which this is the primary purpose, to reduce the need for casting later. Unless there is a specific reason to do otherwise, of course.

Examples of places that might benefit from this change...
geodesic: GEODESIC_ORDER
geomath::_A1m1f: geodesic_order
geomath::_C1f: geodesic_order, m, o
geomath::_A2m1f: m
geomath::_C2f: o, m

@michaelkirk
Copy link
Member

SGTM

This was referenced Jan 23, 2021
@valarauca valarauca mentioned this issue Jan 20, 2024
2 tasks
@valarauca
Copy link
Contributor

Fixed in #58

@michaelkirk
Copy link
Member

In #57

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

No branches or pull requests

3 participants