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

chore: remove redundant ctor in function cast #3989

Merged

Conversation

Skylion007
Copy link
Collaborator

Description

  • I was messing around with some static analysis tools to try to remove all the cstyle casts and realized that the extra ctor was unnecessary and we should always just call cast<>. Some C++ compilers may ellide this ctor, but better to remove it for those that cannot.

@Skylion007 Skylion007 requested review from rwgk and henryiii June 3, 2022 16:42
@Skylion007 Skylion007 changed the title remove useless ctor chore: remove redundant ctor in function cast Jun 3, 2022
@Skylion007 Skylion007 merged commit 42a41bf into pybind:master Jun 3, 2022
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Jun 3, 2022
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label Jul 5, 2022
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.

3 participants