Remove some C-style casts

This commit is contained in:
Max Brunsfeld 2014-03-09 22:55:48 -07:00
parent 504c361cb8
commit 632a88c8ef
2 changed files with 2 additions and 3 deletions

View file

@ -4,4 +4,3 @@ filters=-whitespace,-readability/namespace,-legal/copyright
cpplint=externals/cpplint.py
find src/compiler -type f | xargs $cpplint --root=src --filter=$filters 2>&1
find include -type f | xargs $cpplint --root=include --filter=$filters 2>&1

View file

@ -14,11 +14,11 @@ namespace tree_sitter {
static const char MAX_CHAR = '\xff';
int max_int(const CharacterRange &range) {
return range.max == MAX_CHAR ? 255 : (int)range.max;
return range.max == MAX_CHAR ? 255 : static_cast<int>(range.max);
}
int min_int(const CharacterRange &range) {
return (int)range.min;
return static_cast<int>(range.min);
}
CharacterSet::CharacterSet() : ranges({}) {}