about summary refs log tree commit diff stats
path: root/064rewrite_literal_string.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-03-14 01:00:48 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-03-14 01:00:48 -0700
commit2badd89a58b9666563746d71069abf16f05709ea (patch)
tree779c9feb243fc8d0f33051cd8323fd23f912f373 /064rewrite_literal_string.cc
parent8b095f802129f8c328a3a4dc3de4443890d34d59 (diff)
downloadmu-2badd89a58b9666563746d71069abf16f05709ea.tar.gz
2778 - fix all layers
Diffstat (limited to '064rewrite_literal_string.cc')
-rw-r--r--064rewrite_literal_string.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/064rewrite_literal_string.cc b/064rewrite_literal_string.cc
index 86a18e81..db23a441 100644
--- a/064rewrite_literal_string.cc
+++ b/064rewrite_literal_string.cc
@@ -51,3 +51,16 @@ void rewrite_literal_string_to_text(recipe_ordinal r) {
   caller.steps.swap(new_instructions);
 //?   cerr << "aa: " << to_string(caller) << '\n';
 }
+
+bool contains_numeric_locations(const recipe& caller) {
+  for (int i = 0; i < SIZE(caller.steps); ++i) {
+    const instruction& inst = caller.steps.at(i);
+    for (int in = 0; in < SIZE(inst.ingredients); ++in)
+      if (is_numeric_location(inst.ingredients.at(in)))
+        return true;
+    for (int out = 0; out < SIZE(inst.products); ++out)
+      if (is_numeric_location(inst.products.at(out)))
+        return true;
+  }
+  return false;
+}