1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 21:19:24 +00:00

Avoid g++ -Wold-style-cast warnings.

This commit is contained in:
Bruno Haible
2002-11-21 13:04:08 +00:00
parent befb3d467e
commit 32f5ea88cf
9 changed files with 34 additions and 23 deletions

View File

@@ -346,14 +346,14 @@ int PositionStringParser::nextPosition ()
case '$': _str++; return _end_word_marker;
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
for (_curr_value = 0; isdigit ((unsigned char)(*_str)); _str++)
for (_curr_value = 0; isdigit (static_cast<unsigned char>(*_str)); _str++)
_curr_value = _curr_value * 10 + (*_str - '0');
if (*_str == '-')
{
for (_size = 1, _upper_bound = 0;
isdigit ((unsigned char)(*++_str));
isdigit (static_cast<unsigned char>(*++_str));
_upper_bound = _upper_bound * 10 + (*_str - '0'));
if (_upper_bound <= _curr_value || _upper_bound > _high_bound)