diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-10-28 16:04:35 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-10-28 16:04:35 -0700 |
commit | 37b8273e9a429e7fb391284ef91970c424430885 (patch) | |
tree | 0ddca499b49129d045371a3df48041a6f77a2583 | |
parent | 825873bdf310d387d1a2a0a96237c45e7386b226 (diff) | |
download | mu-37b8273e9a429e7fb391284ef91970c424430885.tar.gz |
2304
I no longer have any null types! That raises confidence that I'm on the right track.
-rw-r--r-- | 021check_instruction.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/021check_instruction.cc b/021check_instruction.cc index f3dd89d8..afece2bf 100644 --- a/021check_instruction.cc +++ b/021check_instruction.cc @@ -88,7 +88,7 @@ bool types_match(reagent lhs, reagent rhs) { // (trees perform the same check recursively on each subtree) bool types_match(type_tree* lhs, type_tree* rhs) { if (!lhs) return true; - if (!rhs || rhs->value == 0) { + if (rhs->value == 0) { if (lhs->value == Type_ordinal["array"]) return false; if (lhs->value == Type_ordinal["address"]) return false; return size_of(rhs) == size_of(lhs); @@ -100,7 +100,7 @@ bool types_match(type_tree* lhs, type_tree* rhs) { // hacky version that allows 0 addresses bool types_match(const reagent lhs, const type_tree* rhs, const vector<double>& data) { if (is_dummy(lhs)) return true; - if (!rhs || rhs->value == 0) { + if (rhs->value == 0) { if (lhs.type->value == Type_ordinal["array"]) return false; if (lhs.type->value == Type_ordinal["address"]) return scalar(data) && data.at(0) == 0; return size_of(rhs) == size_of(lhs); |