Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 17, 2009, 11:53:35 PM (15 years ago)
Author:
rgrieder
Message:

Found a few more C-Style casts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/util/StringUtils.cc

    r3280 r3300  
    8282    {
    8383        size_t pos1 = 0;
    84         int pos2 = (int)(str.size() - 1);
     84        int pos2 = static_cast<int>(str.size() - 1);
    8585        for (; pos1 < str.size() && (str[pos1] == ' ' || str[pos1] == '\t' || str[pos1] == '\n'); pos1++);
    8686        for (; pos2 > 0         && (str[pos2] == ' ' || str[pos2] == '\t' || str[pos2] == '\n'); pos2--);
     
    352352        for (size_t i = 0; i < str->size(); ++i)
    353353        {
    354             (*str)[i] = (char)tolower((*str)[i]);
     354            (*str)[i] = static_cast<char>(tolower((*str)[i]));
    355355        }
    356356    }
     
    376376        for (size_t i = 0; i < str->size(); ++i)
    377377        {
    378             (*str)[i] = (char)toupper((*str)[i]);
     378            (*str)[i] = static_cast<char>(toupper((*str)[i]));
    379379        }
    380380    }
Note: See TracChangeset for help on using the changeset viewer.