about summary refs log tree commit diff stats
path: root/025compare.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 /025compare.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 '025compare.cc')
-rw-r--r--025compare.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/025compare.cc b/025compare.cc
index 056c859d..ca736ec9 100644
--- a/025compare.cc
+++ b/025compare.cc
@@ -7,7 +7,7 @@ put(Recipe_ordinal, "equal", EQUAL);
 :(before "End Primitive Recipe Checks")
 case EQUAL: {
   if (SIZE(inst.ingredients) <= 1) {
-    raise_error << maybe(get(Recipe, r).name) << "'equal' needs at least two ingredients to compare in '" << inst.to_string() << "'\n" << end();
+    raise_error << maybe(get(Recipe, r).name) << "'equal' needs at least two ingredients to compare in '" << to_string(inst) << "'\n" << end();
     break;
   }
   break;
@@ -66,7 +66,7 @@ put(Recipe_ordinal, "greater-than", GREATER_THAN);
 :(before "End Primitive Recipe Checks")
 case GREATER_THAN: {
   if (SIZE(inst.ingredients) <= 1) {
-    raise_error << maybe(get(Recipe, r).name) << "'greater-than' needs at least two ingredients to compare in '" << inst.to_string() << "'\n" << end();
+    raise_error << maybe(get(Recipe, r).name) << "'greater-than' needs at least two ingredients to compare in '" << to_string(inst) << "'\n" << end();
     break;
   }
   for (long long int i = 0; i < SIZE(inst.ingredients); ++i) {
@@ -125,7 +125,7 @@ put(Recipe_ordinal, "lesser-than", LESSER_THAN);
 :(before "End Primitive Recipe Checks")
 case LESSER_THAN: {
   if (SIZE(inst.ingredients) <= 1) {
-    raise_error << maybe(get(Recipe, r).name) << "'lesser-than' needs at least two ingredients to compare in '" << inst.to_string() << "'\n" << end();
+    raise_error << maybe(get(Recipe, r).name) << "'lesser-than' needs at least two ingredients to compare in '" << to_string(inst) << "'\n" << end();
     break;
   }
   for (long long int i = 0; i < SIZE(inst.ingredients); ++i) {
@@ -184,7 +184,7 @@ put(Recipe_ordinal, "greater-or-equal", GREATER_OR_EQUAL);
 :(before "End Primitive Recipe Checks")
 case GREATER_OR_EQUAL: {
   if (SIZE(inst.ingredients) <= 1) {
-    raise_error << maybe(get(Recipe, r).name) << "'greater-or-equal' needs at least two ingredients to compare in '" << inst.to_string() << "'\n" << end();
+    raise_error << maybe(get(Recipe, r).name) << "'greater-or-equal' needs at least two ingredients to compare in '" << to_string(inst) << "'\n" << end();
     break;
   }
   for (long long int i = 0; i < SIZE(inst.ingredients); ++i) {
@@ -251,7 +251,7 @@ put(Recipe_ordinal, "lesser-or-equal", LESSER_OR_EQUAL);
 :(before "End Primitive Recipe Checks")
 case LESSER_OR_EQUAL: {
   if (SIZE(inst.ingredients) <= 1) {
-    raise_error << maybe(get(Recipe, r).name) << "'lesser-or-equal' needs at least two ingredients to compare in '" << inst.to_string() << "'\n" << end();
+    raise_error << maybe(get(Recipe, r).name) << "'lesser-or-equal' needs at least two ingredients to compare in '" << to_string(inst) << "'\n" << end();
     break;
   }
   for (long long int i = 0; i < SIZE(inst.ingredients); ++i) {