diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-10-22 16:27:36 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-10-22 16:27:36 -0700 |
commit | c02478c4010d54acfaed0318a2c2c689b468e92e (patch) | |
tree | 8cdc5a15f685e4ef27205a59306f5781a10b3899 /html/057immutable.cc.html | |
parent | 6a9d8191dfb5606f8d3630375f3ec045bd534ba3 (diff) | |
download | mu-c02478c4010d54acfaed0318a2c2c689b468e92e.tar.gz |
3558
Diffstat (limited to 'html/057immutable.cc.html')
-rw-r--r-- | html/057immutable.cc.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/html/057immutable.cc.html b/html/057immutable.cc.html index 305eaede..ac57964f 100644 --- a/html/057immutable.cc.html +++ b/html/057immutable.cc.html @@ -374,7 +374,7 @@ $error: <span class="Constant">0</span> Transform<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>check_immutable_ingredients<span class="Delimiter">);</span> <span class="Comment">// idempotent</span> <span class="Delimiter">:(code)</span> -<span class="Normal">void</span> check_immutable_ingredients<span class="Delimiter">(</span>recipe_ordinal r<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span class="Normal">void</span> check_immutable_ingredients<span class="Delimiter">(</span><span class="Normal">const</span> recipe_ordinal r<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Comment">// to ensure an address reagent isn't modified, it suffices to show that</span> <span class="Comment">// a) we never write to its contents directly,</span> <span class="Comment">// b) we never call 'put' or 'put-index' on it, and</span> @@ -520,7 +520,7 @@ set<<span class="Normal">int</span>> scan_contained_in_product_indices<spa <span class="Delimiter">}</span> <span class="Delimiter">}</span> -<span class="Normal">bool</span> is_modified_in_recipe<span class="Delimiter">(</span>recipe_ordinal r<span class="Delimiter">,</span> <span class="Normal">int</span> ingredient_index<span class="Delimiter">,</span> <span class="Normal">const</span> recipe& caller<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span class="Normal">bool</span> is_modified_in_recipe<span class="Delimiter">(</span><span class="Normal">const</span> recipe_ordinal r<span class="Delimiter">,</span> <span class="Normal">const</span> <span class="Normal">int</span> ingredient_index<span class="Delimiter">,</span> <span class="Normal">const</span> recipe& caller<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Normal">const</span> recipe& callee = get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">);</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!callee<span class="Delimiter">.</span>has_header<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">"can't check mutability of ingredients in recipe "</span> << callee<span class="Delimiter">.</span>name << <span class="Constant">" because it uses 'next-ingredient' directly, rather than a recipe header.</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> |