nothings / stb

stb single-file public domain libraries for C/C++
https://twitter.com/nothings
Other
26.31k stars 7.69k forks source link

stb_image: warnings MSVC: Implicity conversions/possible loss of data #1444

Closed diamante0018 closed 1 year ago

diamante0018 commented 1 year ago

Describe the bug After some recent changes to stb_image.h file, when compiling with MSVC set to treat all warnings as errors, this library fails to compile at these lines with this message: warning C4244: 'argument': conversion from '...' to '...', possible loss of data

- stb_image.h(2224,32)
- stb_image.h(2281,35)
- stb_image.h(3425,49)

Expected behavior Compilation with no warnings, the easiest fix would be to explicitly cast these variables.

Linked my pr as I am trying to fix it.

diamante0018 commented 1 year ago

Should be fixed. Or partially fixed. See linked pr

ChrisThrasher commented 1 year ago

https://github.com/ChrisThrasher/SFML/actions/runs/5316190878

1443 works! I hope we can get a new stb_image.h release in the near future so SFML can start using it.