Small cleanup in String::operator==

This commit is contained in:
Max Brunsfeld 2014-02-15 16:14:52 -08:00
parent a63624f2aa
commit fb1ef60f7d

View file

@ -9,7 +9,7 @@ namespace tree_sitter {
bool String::operator==(const Rule &rule) const {
const String *other = dynamic_cast<const String *>(&rule);
return (other != NULL) && (other->value == value);
return other && (other->value == value);
}
size_t String::hash_code() const {