Merge pull request #298 from jrade/main

Silenced Visual Studio compiler warning
This commit is contained in:
Daniel Lemire 2025-01-16 15:55:12 -05:00 committed by GitHub
commit 482cc1f251
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -482,7 +482,14 @@ parse_int_string(UC const *p, UC const *pend, T &value,
UC const *const first = p;
bool const negative = (*p == UC('-'));
#ifdef FASTFLOAT_VISUAL_STUDIO
#pragma warning(push)
#pragma warning(disable : 4127)
#endif
if (!std::is_signed<T>::value && negative) {
#ifdef FASTFLOAT_VISUAL_STUDIO
#pragma warning(pop)
#endif
answer.ec = std::errc::invalid_argument;
answer.ptr = first;
return answer;