diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-14 21:46:23 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-14 21:46:23 +0000 |
commit | f9a65c75ec9c788174daa33f261484515772c926 (patch) | |
tree | a434e3f45f939caf3242a0fd3969915c6a363a34 /base | |
parent | a1338c804e5d8ac43bbd30ca4dfa95eb36479725 (diff) | |
download | chromium_src-f9a65c75ec9c788174daa33f261484515772c926.zip chromium_src-f9a65c75ec9c788174daa33f261484515772c926.tar.gz chromium_src-f9a65c75ec9c788174daa33f261484515772c926.tar.bz2 |
base/json: Use IsAsciiDigit in JSONReader::ReadInt() function.
TEST=base_unittests --gtest_filter=JSON*
R=tony@chromium.org
Review URL: http://codereview.chromium.org/8276004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105586 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/json/json_reader.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/base/json/json_reader.cc b/base/json/json_reader.cc index 748cc4e..f6bdc35 100644 --- a/base/json/json_reader.cc +++ b/base/json/json_reader.cc @@ -28,9 +28,9 @@ bool ReadInt(base::JSONReader::Token& token, bool can_have_leading_zeros) { wchar_t first = token.NextChar(); int len = 0; - // Read in more digits + // Read in more digits. wchar_t c = first; - while ('\0' != c && '0' <= c && c <= '9') { + while ('\0' != c && IsAsciiDigit(c)) { ++token.length; ++len; c = token.NextChar(); |