mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-09-13 14:12:25 +08:00
Merge pull request #298 from jrade/main
Silenced Visual Studio compiler warning
This commit is contained in:
commit
482cc1f251
@ -482,7 +482,14 @@ parse_int_string(UC const *p, UC const *pend, T &value,
|
|||||||
UC const *const first = p;
|
UC const *const first = p;
|
||||||
|
|
||||||
bool const negative = (*p == UC('-'));
|
bool const negative = (*p == UC('-'));
|
||||||
|
#ifdef FASTFLOAT_VISUAL_STUDIO
|
||||||
|
#pragma warning(push)
|
||||||
|
#pragma warning(disable : 4127)
|
||||||
|
#endif
|
||||||
if (!std::is_signed<T>::value && negative) {
|
if (!std::is_signed<T>::value && negative) {
|
||||||
|
#ifdef FASTFLOAT_VISUAL_STUDIO
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
answer.ec = std::errc::invalid_argument;
|
answer.ec = std::errc::invalid_argument;
|
||||||
answer.ptr = first;
|
answer.ptr = first;
|
||||||
return answer;
|
return answer;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user