Update main.cpp
This commit is contained in:
parent
559a7294a6
commit
c82c4cd192
@ -124,7 +124,7 @@ Json::String ValueTest::normalizeFloatingPointStr(const Json::String& s) {
|
||||
auto index = s.find_last_of("eE");
|
||||
if (index == s.npos)
|
||||
return s;
|
||||
std::size_t signWidth = (s[index + 1] == '+' || s[index + 1] == '-' ) ? 1 : 0;
|
||||
std::size_t signWidth = (s[index + 1] == '+' || s[index + 1] == '-') ? 1 : 0;
|
||||
auto exponentStartIndex = index + 1 + signWidth;
|
||||
Json::String normalized = s.substr(0, exponentStartIndex);
|
||||
auto indexDigit = s.find_first_not_of('0', exponentStartIndex);
|
||||
|
Loading…
Reference in New Issue
Block a user