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:
@@ -69,7 +69,7 @@ void KeywordExt::init_selchars (Vectors *v)
|
||||
if (option[ALLCHARS])
|
||||
/* Use all the character positions in the KEY. */
|
||||
for (int i = _allchars_length; i > 0; k++, ptr++, i--)
|
||||
v->_occurrences[(unsigned char)(*ptr = *k)]++;
|
||||
v->_occurrences[static_cast<unsigned char>(*ptr = *k)]++;
|
||||
else
|
||||
/* Only use those character positions specified by the user. */
|
||||
{
|
||||
@@ -88,7 +88,7 @@ void KeywordExt::init_selchars (Vectors *v)
|
||||
else
|
||||
/* Out of range of KEY length, so we'll just skip it. */
|
||||
continue;
|
||||
v->_occurrences[(unsigned char)*ptr]++;
|
||||
v->_occurrences[static_cast<unsigned char>(*ptr)]++;
|
||||
ptr++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user