about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--010vm.cc22
-rw-r--r--055shape_shifting_container.cc20
2 files changed, 21 insertions, 21 deletions
diff --git a/010vm.cc b/010vm.cc
index 7afb3d4f..2238c897 100644
--- a/010vm.cc
+++ b/010vm.cc
@@ -340,7 +340,7 @@ type_tree::type_tree(const type_tree& old) {
   right = old.right ? new type_tree(*old.right) : NULL;
 }
 
-string_tree::string_tree(const string_tree& old) {  // :value(old.value) {
+string_tree::string_tree(const string_tree& old) {
   value = old.value;
   left = old.left ? new string_tree(*old.left) : NULL;
   right = old.right ? new string_tree(*old.right) : NULL;
@@ -385,6 +385,26 @@ string_tree::~string_tree() {
   delete right;
 }
 
+void append(type_tree*& base, type_tree* extra) {
+  if (!base) {
+    base = extra;
+    return;
+  }
+  type_tree* curr = base;
+  while (curr->right) curr = curr->right;
+  curr->right = extra;
+}
+
+void append(string_tree*& base, string_tree* extra) {
+  if (!base) {
+    base = extra;
+    return;
+  }
+  string_tree* curr = base;
+  while (curr->right) curr = curr->right;
+  curr->right = extra;
+}
+
 string slurp_until(istream& in, char delim) {
   ostringstream out;
   char c;
diff --git a/055shape_shifting_container.cc b/055shape_shifting_container.cc
index 5c5f6b93..375e1e18 100644
--- a/055shape_shifting_container.cc
+++ b/055shape_shifting_container.cc
@@ -364,26 +364,6 @@ bool final_type_ingredient(int type_ingredient_index, const type_info& container
   return true;
 }
 
-void append(type_tree*& base, type_tree* extra) {
-  if (!base) {
-    base = extra;
-    return;
-  }
-  type_tree* curr = base;
-  while (curr->right) curr = curr->right;
-  curr->right = extra;
-}
-
-void append(string_tree*& base, string_tree* extra) {
-  if (!base) {
-    base = extra;
-    return;
-  }
-  string_tree* curr = base;
-  while (curr->right) curr = curr->right;
-  curr->right = extra;
-}
-
 void test_replace_type_ingredients_entire() {
   run("container foo:_elem [\n"
       "  x:_elem\n"