We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3c8642 commit d6c4a8fCopy full SHA for d6c4a8f
src/test_lib_json/main.cpp
@@ -124,8 +124,8 @@ Json::String ValueTest::normalizeFloatingPointStr(const Json::String& s) {
124
auto index = s.find_last_of("eE");
125
if (index == s.npos)
126
return s;
127
- int hasSign = (s[index + 1] == '+' || s[index + 1] == '-') ? 1 : 0;
128
- auto exponentStartIndex = index + 1 + hasSign;
+ std::size_t signWidth = (s[index + 1] == '+' || s[index + 1] == '-') ? 1 : 0;
+ auto exponentStartIndex = index + 1 + signWidth;
129
Json::String normalized = s.substr(0, exponentStartIndex);
130
auto indexDigit = s.find_first_not_of('0', exponentStartIndex);
131
Json::String exponent = "0";
0 commit comments