about summary refs log tree commit diff stats
path: root/html/058shape_shifting_container.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-11-29 14:18:52 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-11-29 14:18:52 -0800
commitdb1f56c8449d2ea3d158753fe37bac5a750a2566 (patch)
tree508a24c522c040498dbe7d60036035f3c4ae440a /html/058shape_shifting_container.cc.html
parent3670fb87f6d38c9ba4fcbb1eaa6439b4007a194e (diff)
downloadmu-db1f56c8449d2ea3d158753fe37bac5a750a2566.tar.gz
2611
Diffstat (limited to 'html/058shape_shifting_container.cc.html')
-rw-r--r--html/058shape_shifting_container.cc.html11
1 files changed, 2 insertions, 9 deletions
diff --git a/html/058shape_shifting_container.cc.html b/html/058shape_shifting_container.cc.html
index 0402d54b..6229c527 100644
--- a/html/058shape_shifting_container.cc.html
+++ b/html/058shape_shifting_container.cc.html
@@ -21,7 +21,6 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; }
 .Delimiter { color: #a04060; }
 .SalientComment { color: #00ffff; }
 .Identifier { color: #804000; }
-.CommentedCode { color: #6c6c6c; }
 -->
 </style>
 
@@ -84,7 +83,7 @@ void read_type_ingredients<span class="Delimiter">(</span>string&amp; name<span
     put<span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">,</span> name<span class="Delimiter">,</span> Next_type_ordinal++<span class="Delimiter">);</span>
   type_info&amp; info = get_or_insert<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> get<span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">,</span> name<span class="Delimiter">));</span>
   long long int next_type_ordinal = START_TYPE_INGREDIENTS<span class="Delimiter">;</span>
-  while <span class="Delimiter">(</span>!in<span class="Delimiter">.</span>eof<span class="Delimiter">())</span> <span class="Delimiter">{</span>
+  while <span class="Delimiter">(</span>has_data<span class="Delimiter">(</span>in<span class="Delimiter">))</span> <span class="Delimiter">{</span>
     string curr = slurp_until<span class="Delimiter">(</span>in<span class="Delimiter">,</span> <span class="Constant">':'</span><span class="Delimiter">);</span>
     if <span class="Delimiter">(</span>info<span class="Delimiter">.</span>type_ingredient_names<span class="Delimiter">.</span>find<span class="Delimiter">(</span>curr<span class="Delimiter">)</span> != info<span class="Delimiter">.</span>type_ingredient_names<span class="Delimiter">.</span>end<span class="Delimiter">())</span> <span class="Delimiter">{</span>
       raise_error &lt;&lt; <span class="Constant">&quot;can't repeat type ingredient names in a single container definition</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
@@ -130,13 +129,7 @@ long long int size_of_type_ingredient<span class="Delimiter">(</span>const type_
   <span class="Delimiter">}</span>
   assert<span class="Delimiter">(</span>curr<span class="Delimiter">);</span>
   assert<span class="Delimiter">(</span>!curr<span class="Delimiter">-&gt;</span>left<span class="Delimiter">);</span>  <span class="Comment">// unimplemented</span>
-  if <span class="Delimiter">(</span>!contains_key<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> curr<span class="Delimiter">-&gt;</span>value<span class="Delimiter">))</span> <span class="Delimiter">{</span>
-    <span class="Comment">// temporarily while we're still ironing out kinks; eventually replace with a raise_error</span>
-<span class="CommentedCode">//?     DUMP(&quot;&quot;);</span>
-    cerr &lt;&lt; <span class="Constant">&quot;missing type &quot;</span> &lt;&lt; debug_string<span class="Delimiter">(</span>curr<span class="Delimiter">)</span> &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span>
-    exit<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span>
-  <span class="Delimiter">}</span>
-  assert<span class="Delimiter">(</span>contains_key<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> curr<span class="Delimiter">-&gt;</span>value<span class="Delimiter">));</span>
+  if <span class="Delimiter">(</span>!contains_key<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> curr<span class="Delimiter">-&gt;</span>value<span class="Delimiter">))</span> <span class="Identifier">return</span> <span class="Constant">0</span><span class="Delimiter">;</span>
   trace<span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">&quot;type&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;type deduced to be &quot;</span> &lt;&lt; get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> curr<span class="Delimiter">-&gt;</span>value<span class="Delimiter">).</span>name &lt;&lt; <span class="Constant">&quot;$&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
   type_tree tmp<span class="Delimiter">(</span>curr<span class="Delimiter">-&gt;</span>value<span class="Delimiter">);</span>
   if <span class="Delimiter">(</span>curr<span class="Delimiter">-&gt;</span>right<span class="Delimiter">)</span>