about summary refs log tree commit diff stats
path: root/023boolean.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-06-15 22:16:09 -0700
committerKartik Agaram <vc@akkartik.com>2018-06-15 22:16:09 -0700
commitce9b2b0515eaf92a9c68c8608fd9bf392c941d50 (patch)
treeeb1899f86308c712e54ef94a1c85243c26621c45 /023boolean.cc
parent0edd9b9fc60440213e4df926ea511419ee291f1e (diff)
downloadmu-ce9b2b0515eaf92a9c68c8608fd9bf392c941d50.tar.gz
4258 - undo 4257
Diffstat (limited to '023boolean.cc')
-rw-r--r--023boolean.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/023boolean.cc b/023boolean.cc
index 976cbff9..3d51fd7a 100644
--- a/023boolean.cc
+++ b/023boolean.cc
@@ -26,7 +26,7 @@ case AND: {
 case AND: {
   bool result = true;
   for (int i = 0;  i < SIZE(ingredients);  ++i)
-    result = result && scalar_ingredient(ingredients, i);
+    result = result && ingredients.at(i).at(0);
   products.resize(1);
   products.at(0).push_back(result);
   break;
@@ -84,7 +84,7 @@ case OR: {
 case OR: {
   bool result = false;
   for (int i = 0;  i < SIZE(ingredients);  ++i)
-    result = result || scalar_ingredient(ingredients, i);
+    result = result || ingredients.at(i).at(0);
   products.resize(1);
   products.at(0).push_back(result);
   break;
@@ -127,8 +127,8 @@ case NOT: {
     break;
   }
   for (int i = 0;  i < SIZE(inst.ingredients);  ++i) {
-    if (!is_mu_scalar(inst.ingredients.at(i)) && !is_mu_address(inst.ingredients.at(i))) {
-      raise << maybe(get(Recipe, r).name) << "'not' requires ingredients that can be interpreted as boolean, but got '" << inst.ingredients.at(i).original_string << "'\n" << end();
+    if (!is_mu_scalar(inst.ingredients.at(i))) {
+      raise << maybe(get(Recipe, r).name) << "'not' requires boolean ingredients, but got '" << inst.ingredients.at(i).original_string << "'\n" << end();
       goto finish_checking_instruction;
     }
   }
@@ -145,7 +145,7 @@ case NOT: {
 case NOT: {
   products.resize(SIZE(ingredients));
   for (int i = 0;  i < SIZE(ingredients);  ++i) {
-    products.at(i).push_back(!scalar_ingredient(ingredients, i));
+    products.at(i).push_back(!ingredients.at(i).at(0));
   }
   break;
 }