replace std::isdigit() to avoid asserts on windows

This commit is contained in:
Arvid Norberg 2009-01-11 20:40:43 +00:00
parent ab09424d8a
commit de9286a760
1 changed files with 6 additions and 1 deletions

View File

@ -53,9 +53,14 @@ namespace
using namespace libtorrent;
bool is_digit(char c)
{
return c >= '0' && c <= '9';
}
int decode_digit(char c)
{
if (std::isdigit(c)) return c - '0';
if (is_digit(c)) return c - '0';
return unsigned(c) - 'A' + 10;
}