Changeset 3300 for code/trunk/src/util
- Timestamp:
- Jul 17, 2009, 11:53:35 PM (15 years ago)
- Location:
- code/trunk/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/util/Math.h
r3280 r3300 122 122 inline int round(T x) 123 123 { 124 return (int)(x + 0.5);124 return static_cast<int>(x + 0.5); 125 125 } 126 126 -
code/trunk/src/util/StringUtils.cc
r3280 r3300 82 82 { 83 83 size_t pos1 = 0; 84 int pos2 = (int)(str.size() - 1);84 int pos2 = static_cast<int>(str.size() - 1); 85 85 for (; pos1 < str.size() && (str[pos1] == ' ' || str[pos1] == '\t' || str[pos1] == '\n'); pos1++); 86 86 for (; pos2 > 0 && (str[pos2] == ' ' || str[pos2] == '\t' || str[pos2] == '\n'); pos2--); … … 352 352 for (size_t i = 0; i < str->size(); ++i) 353 353 { 354 (*str)[i] = (char)tolower((*str)[i]);354 (*str)[i] = static_cast<char>(tolower((*str)[i])); 355 355 } 356 356 } … … 376 376 for (size_t i = 0; i < str->size(); ++i) 377 377 { 378 (*str)[i] = (char)toupper((*str)[i]);378 (*str)[i] = static_cast<char>(toupper((*str)[i])); 379 379 } 380 380 }
Note: See TracChangeset
for help on using the changeset viewer.