mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-17 10:59:39 +00:00
Fix MSVC C4146 warning for unsigned types in from_chars
The from_chars template is instantiated with unsigned types (e.g. uint64_t for Content-Length), where unary minus on `result` triggers MSVC warning C4146, failing the 32-bit build under warnings-as-errors. Use `T(0) - result`, which yields the identical two's-complement value without the warning.
This commit is contained in:
1 parent
3adc525cec
commit
ef2beaea34
1 file changed
+1
-1
Reference in new issue
Block a user