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

Fix improper uses of reinterpret_cast #2382

Closed
wants to merge 0 commits into from
Closed

Fix improper uses of reinterpret_cast #2382

wants to merge 0 commits into from

Conversation

GravisZro
Copy link
Contributor

There are many instances where a class is inappropriately reinterpret_cast'd to a subclass. A static_cast should be used to verify they are in fact convertible types.

There are also instances where a void* is inappropriately reinterpret_cast'd. static_cast should be used with void* because void* is universally convertible.

Further reading: https://en.cppreference.com/w/cpp/language/static_cast

@GravisZro GravisZro requested a review from a team as a code owner July 11, 2021 12:18
@GravisZro GravisZro changed the title code quality: use static_cast where appropriate Fix improper uses of reinterpret_cast Jul 16, 2021
@GravisZro GravisZro closed this Sep 9, 2021
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.

4 participants