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 MSVC warning with -W4 #151

Merged
merged 1 commit into from
Oct 5, 2022
Merged

Conversation

sthalik
Copy link
Contributor

@sthalik sthalik commented Oct 4, 2022

In Containers::BitArray, cast bool to char before performing arithmetic on it.

@codecov
Copy link

codecov bot commented Oct 4, 2022

Codecov Report

Base: 97.94% // Head: 97.94% // No change to project coverage 👍

Coverage data is based on head (32c181c) compared to base (14bd297).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head 32c181c differs from pull request most recent head 04be172. Consider uploading reports for the commit 04be172 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #151   +/-   ##
=======================================
  Coverage   97.94%   97.94%           
=======================================
  Files         133      133           
  Lines       10862    10862           
=======================================
  Hits        10639    10639           
  Misses        223      223           
Impacted Files Coverage Δ
src/Corrade/Containers/BitArray.h 92.30% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pezcode
Copy link
Contributor

pezcode commented Oct 4, 2022

The same warning exists in BitArrayView, should probably be fixed there as well

@mosra mosra added this to the 2022.0a milestone Oct 4, 2022
This fixes a MSVC warning.

warning C4804: '-': unsafe use of type ' bool' in operation

v2: do the same for BitArrayView (spotted by @pezcode)
@sthalik sthalik force-pushed the pr/fix-bool-unary-minus branch from 32c181c to 04be172 Compare October 4, 2022 17:07
@mosra mosra merged commit 04be172 into mosra:master Oct 5, 2022
@mosra
Copy link
Owner

mosra commented Oct 5, 2022

Thank you both! 👍

@sthalik sthalik deleted the pr/fix-bool-unary-minus branch October 5, 2022 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

3 participants