Avoid unsigned unary minux warning on MSVC in IntFromChars

This commit is contained in:
Jonathan G Rennison
2021-11-29 18:15:56 +00:00
parent 82582895cc
commit 3ef6b29f4a

View File

@@ -72,7 +72,11 @@ inline bool IntFromChars(const char* first, const char* last, T& value)
}
}
if (start == first) return false;
if (std::is_signed<T>::value) {
value = negative ? -out : out;
} else {
value = out;
}
return true;
}