Skip to content

Conversation

bjornblissing
Copy link
Contributor

There is no need to perform the check if T is of type bool, since it is guaranteed to fit in all other integral types.

This avoids triggering a C4804 warning in Visual Studio, ie. unsafe use of type 'bool' in operation

@tomfinegan
Copy link
Contributor

@bjornblissing
Thanks for the PR! I'll try to get this reviewed and merged today, but it's blocked until #815 and #816 are addressed by the imminent v1.5.2 release.

There is no need to perform the check if T is of type bool, since it is guaranteed to fit in all other integral types.

This avoids triggering a C4804 warning in Visual Studio, ie. `unsafe use of type 'bool' in operation`
@tomfinegan tomfinegan merged commit 43ada9a into google:master Feb 26, 2022
@bjornblissing bjornblissing deleted the msvc19-bool-warning-fix branch February 26, 2022 11:03
tomfinegan pushed a commit that referenced this pull request Mar 2, 2022
There is no need to perform the check if T is of type bool, since it is guaranteed to fit in all other integral types.

This avoids triggering a C4804 warning in Visual Studio, ie. `unsafe use of type 'bool' in operation`
danielgronlund pushed a commit to danielgronlund/draco that referenced this pull request Aug 22, 2024
There is no need to perform the check if T is of type bool, since it is guaranteed to fit in all other integral types.

This avoids triggering a C4804 warning in Visual Studio, ie. `unsafe use of type 'bool' in operation`
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