diff --git a/src/compiler/rules/string.cpp b/src/compiler/rules/string.cpp index 1af0769f..df501fba 100644 --- a/src/compiler/rules/string.cpp +++ b/src/compiler/rules/string.cpp @@ -9,7 +9,7 @@ namespace tree_sitter { bool String::operator==(const Rule &rule) const { const String *other = dynamic_cast(&rule); - return (other != NULL) && (other->value == value); + return other && (other->value == value); } size_t String::hash_code() const {