Skip to content

Commit 482cc1f

Browse files
authored
Merge pull request #298 from jrade/main
Silenced Visual Studio compiler warning
2 parents be9a845 + d4d5748 commit 482cc1f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/fast_float/ascii_number.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,14 @@ parse_int_string(UC const *p, UC const *pend, T &value,
482482
UC const *const first = p;
483483

484484
bool const negative = (*p == UC('-'));
485+
#ifdef FASTFLOAT_VISUAL_STUDIO
486+
#pragma warning(push)
487+
#pragma warning(disable : 4127)
488+
#endif
485489
if (!std::is_signed<T>::value && negative) {
490+
#ifdef FASTFLOAT_VISUAL_STUDIO
491+
#pragma warning(pop)
492+
#endif
486493
answer.ec = std::errc::invalid_argument;
487494
answer.ptr = first;
488495
return answer;

0 commit comments

Comments
 (0)