Skip to content

Commit

Permalink
eliminated isdigit call
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnLangford committed Jan 24, 2013
1 parent dbaee82 commit c44cd5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vowpalwabbit/parse_example.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ size_t hashstring (substring s, uint32_t h)

char *p = s.begin;
while (p != s.end)
if (isdigit(*p))
if (*p >= '0' && *p <= '9')
ret = 10*ret + *(p++) - '0';
else
return uniform_hash((unsigned char *)s.begin, s.end - s.begin, h);
Expand Down

0 comments on commit c44cd5d

Please sign in to comment.