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

replace static_cast<bool> w/ non-zero comparison to avoid compiler… #12

Merged
merged 1 commit into from
May 24, 2017
Merged

Conversation

jadamcrain
Copy link
Contributor

@jadamcrain jadamcrain commented May 23, 2017

… warnings on MSVC.

using static_cast<bool>(int) on MSVC results in a compiler warning.  Proposing this as a portable substitute.

Discussion from SO:

https://stackoverflow.com/questions/4968033/why-does-casting-an-int-to-a-bool-give-a-warning

@jadamcrain jadamcrain changed the title replace static_cast<bool> w/ to non-zero comparison to avoid compiler… replace static_cast<bool> w/ non-zero comparison to avoid compiler… May 23, 2017
@vietjtnguyen vietjtnguyen merged commit a705f49 into vietjtnguyen:master May 24, 2017
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.

2 participants