Skip to content

fix MSVC warning with -W4#151

Merged
mosra merged 1 commit into
mosra:masterfrom
sthalik:pr/fix-bool-unary-minus
Oct 5, 2022
Merged

fix MSVC warning with -W4#151
mosra merged 1 commit into
mosra:masterfrom
sthalik:pr/fix-bool-unary-minus

Conversation

@sthalik

@sthalik sthalik commented Oct 4, 2022

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Oct 4, 2022

Copy link
Copy Markdown

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

pezcode commented Oct 4, 2022

Copy link
Copy Markdown
Contributor

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

mosra commented Oct 5, 2022

Copy link
Copy Markdown
Owner

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