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 issue 3668 by removing bool casts in numpy.h #3669

Merged
merged 1 commit into from
Jan 31, 2022

Conversation

Skylion007
Copy link
Collaborator

@Skylion007 Skylion007 commented Jan 31, 2022

Description

Fixes #3668 by doing a boolean evaluation instead of casting ints to boolean. This fixes a possible performance warning on MSVC.

Suggested changelog entry:

* Remove a boolean cast in numpy.h that causes MSVC C4800 warnings when compiling against Python 3.10 or newer.

@Skylion007 Skylion007 requested review from rwgk and henryiii January 31, 2022 17:29
@Skylion007 Skylion007 merged commit 978617f into pybind:master Jan 31, 2022
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Jan 31, 2022
@Skylion007 Skylion007 deleted the fix-issue-3668 branch January 31, 2022 17:58
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label Feb 2, 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.

[BUG]: c4800 warning when compiling with MSVC and python 3.10
2 participants