diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-09-15 01:01:58 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-09-15 01:01:58 -0700 |
commit | 0ca56ed853c3d9bc8c26d1b014d8b665363fc2d0 (patch) | |
tree | abd2d2e4b65c34797a635aeb2f7d06c9d65c7bf9 /html/033exclusive_container.cc.html | |
parent | 36b927a63cb25e9fc64cf4ae079b32d23d528b1b (diff) | |
download | mu-0ca56ed853c3d9bc8c26d1b014d8b665363fc2d0.tar.gz |
3355
Diffstat (limited to 'html/033exclusive_container.cc.html')
-rw-r--r-- | html/033exclusive_container.cc.html | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/html/033exclusive_container.cc.html b/html/033exclusive_container.cc.html index 5068a365..01cdfbfb 100644 --- a/html/033exclusive_container.cc.html +++ b/html/033exclusive_container.cc.html @@ -144,8 +144,9 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span raise << maybe<span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"first ingredient of 'maybe-convert' should be an exclusive-container, but got '"</span> << base<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> - <span class="Normal">const</span> type_tree* root_type = base<span class="Delimiter">.</span>type<span class="Delimiter">-></span>atom ? base<span class="Delimiter">.</span>type : base<span class="Delimiter">.</span>type<span class="Delimiter">-></span>left<span class="Delimiter">;</span> - <span class="Normal">if</span> <span class="Delimiter">(</span>!root_type<span class="Delimiter">-></span>atom || root_type<span class="Delimiter">-></span>value == <span class="Constant">0</span> || !contains_key<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> root_type<span class="Delimiter">-></span>value<span class="Delimiter">)</span> || get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> root_type<span class="Delimiter">-></span>value<span class="Delimiter">).</span>kind != EXCLUSIVE_CONTAINER<span class="Delimiter">)</span> <span class="Delimiter">{</span> + <span class="Normal">const</span> type_tree* base_type = base<span class="Delimiter">.</span>type<span class="Delimiter">;</span> + <span class="Comment">// Update MAYBE_CONVERT base_type in Check</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>!base_type<span class="Delimiter">-></span>atom || base_type<span class="Delimiter">-></span>value == <span class="Constant">0</span> || !contains_key<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> base_type<span class="Delimiter">-></span>value<span class="Delimiter">)</span> || get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> base_type<span class="Delimiter">-></span>value<span class="Delimiter">).</span>kind != EXCLUSIVE_CONTAINER<span class="Delimiter">)</span> <span class="Delimiter">{</span> raise << maybe<span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"first ingredient of 'maybe-convert' should be an exclusive-container, but got '"</span> << base<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> @@ -162,7 +163,7 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span <span class="Comment">// Update MAYBE_CONVERT product in Check</span> reagent& offset = inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> populate_value<span class="Delimiter">(</span>offset<span class="Delimiter">);</span> - <span class="Normal">if</span> <span class="Delimiter">(</span>offset<span class="Delimiter">.</span>value >= SIZE<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> root_type<span class="Delimiter">-></span>value<span class="Delimiter">).</span>elements<span class="Delimiter">))</span> <span class="Delimiter">{</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>offset<span class="Delimiter">.</span>value >= SIZE<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> base_type<span class="Delimiter">-></span>value<span class="Delimiter">).</span>elements<span class="Delimiter">))</span> <span class="Delimiter">{</span> raise << maybe<span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"invalid tag "</span> << offset<span class="Delimiter">.</span>value << <span class="Constant">" in '"</span> << inst<span class="Delimiter">.</span>original_string << <span class="cSpecial">'\n'</span> << end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> |