about summary refs log tree commit diff stats
path: root/037new.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-02-19 13:42:45 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-02-19 13:42:45 -0800
commit9f95c7451b940b6644cb6fd6783ea9c17168357e (patch)
treed1443c9c4dc48bdc6bd67c7e16b43b9185d6d835 /037new.cc
parentb83b2cfd6676e0caa18b39f22f01bdebf41c9d58 (diff)
downloadmu-9f95c7451b940b6644cb6fd6783ea9c17168357e.tar.gz
2685
Stack of plans for cleaning up replace_type_ingredients() and a couple
of other things, from main problem to subproblems:

  include type names in the type_tree rather than in the separate properties vector
  make type_tree and string_tree real cons cells, with separate leaf nodes
  redo the vocabulary for dumping various objects:
    do we really need to_string and debug_string?
    can we have a version with *all* information?
    can we have to_string not call debug_string?

This commit nibbles at the edges of the final task, switching from
member method syntax to global function like almost everything else. I'm
mostly using methods just for STL in this project.
Diffstat (limited to '037new.cc')
-rw-r--r--037new.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/037new.cc b/037new.cc
index 95339edc..05d8a3e7 100644
--- a/037new.cc
+++ b/037new.cc
@@ -81,7 +81,7 @@ put(Recipe_ordinal, "new", NEW);
 case NEW: {
   const recipe& caller = get(Recipe, r);
   if (inst.ingredients.empty() || SIZE(inst.ingredients) > 2) {
-    raise_error << maybe(caller.name) << "'new' requires one or two ingredients, but got " << inst.to_string() << '\n' << end();
+    raise_error << maybe(caller.name) << "'new' requires one or two ingredients, but got " << to_string(inst) << '\n' << end();
     break;
   }
   // End NEW Check Special-cases
@@ -95,7 +95,7 @@ case NEW: {
     break;
   }
   if (!product_of_new_is_valid(inst)) {
-    raise_error << maybe(caller.name) << "product of 'new' has incorrect type: " << inst.to_string() << '\n' << end();
+    raise_error << maybe(caller.name) << "product of 'new' has incorrect type: " << to_string(inst) << '\n' << end();
     break;
   }
   break;
@@ -301,7 +301,7 @@ put(Recipe_ordinal, "abandon", ABANDON);
 :(before "End Primitive Recipe Checks")
 case ABANDON: {
   if (SIZE(inst.ingredients) != 1) {
-    raise_error << maybe(get(Recipe, r).name) << "'abandon' requires one ingredient, but got '" << inst.to_string() << "'\n" << end();
+    raise_error << maybe(get(Recipe, r).name) << "'abandon' requires one ingredient, but got '" << to_string(inst) << "'\n" << end();
     break;
   }
   reagent types = inst.ingredients.at(0);