Skip to content

Remove unneeded static casts#3086

Merged
StephanTLavavej merged 1 commit intomicrosoft:mainfrom
LumioseSil:static-cast
Sep 13, 2022
Merged

Remove unneeded static casts#3086
StephanTLavavej merged 1 commit intomicrosoft:mainfrom
LumioseSil:static-cast

Conversation

@LumioseSil
Copy link
Copy Markdown
Contributor

We already know that __n, __j, and __m are already integers, so there is no need to use static casts

@LumioseSil LumioseSil requested a review from a team as a code owner September 7, 2022 13:18
We already know that __n, __j, and __m are already integers, so there is no need to use static casts
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Sep 8, 2022
@StephanTLavavej
Copy link
Copy Markdown
Member

Thanks, good catches. The static_cast removals are definitely great. We often use auto after static_cast to avoid repeating the (sometimes complicated/lengthy) type, but int is the simplest and shortest there is, so I believe that this is reasonable.

@StephanTLavavej StephanTLavavej self-assigned this Sep 12, 2022
@StephanTLavavej
Copy link
Copy Markdown
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 7eea1bf into microsoft:main Sep 13, 2022
@StephanTLavavej
Copy link
Copy Markdown
Member

Thanks for this code cleanup! 😸 😸 😸 😸 😸

@LumioseSil LumioseSil deleted the static-cast branch September 26, 2022 16:08
CaseyCarter pushed a commit to CaseyCarter/STL that referenced this pull request Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Something can be improved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants