base/json: Collapse a condition in ReadHexDigits into a single if clause.
TEST=base_unittests --gtest_filter=JSON* R=tony@chromium.org Review URL: http://codereview.chromium.org/8312004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106096 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@ -51,9 +51,7 @@ bool ReadInt(base::JSONReader::Token& token, bool can_have_leading_zeros) {
|
||||
bool ReadHexDigits(base::JSONReader::Token& token, int digits) {
|
||||
for (int i = 1; i <= digits; ++i) {
|
||||
wchar_t c = *(token.begin + token.length + i);
|
||||
if ('\0' == c)
|
||||
return false;
|
||||
if (!IsHexDigit(c))
|
||||
if (c == '\0' || !IsHexDigit(c))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user