From fb1ef60f7d6e305dd66d0c446f3068ca11439aa3 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Sat, 15 Feb 2014 16:14:52 -0800 Subject: [PATCH] Small cleanup in String::operator== --- src/compiler/rules/string.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {