about summary refs log tree commit diff stats
path: root/html/041jump_target.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-09-15 01:01:58 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-09-15 01:01:58 -0700
commit0ca56ed853c3d9bc8c26d1b014d8b665363fc2d0 (patch)
treeabd2d2e4b65c34797a635aeb2f7d06c9d65c7bf9 /html/041jump_target.cc.html
parent36b927a63cb25e9fc64cf4ae079b32d23d528b1b (diff)
downloadmu-0ca56ed853c3d9bc8c26d1b014d8b665363fc2d0.tar.gz
3355
Diffstat (limited to 'html/041jump_target.cc.html')
-rw-r--r--html/041jump_target.cc.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/html/041jump_target.cc.html b/html/041jump_target.cc.html
index 045e3680..8fb25054 100644
--- a/html/041jump_target.cc.html
+++ b/html/041jump_target.cc.html
@@ -61,7 +61,7 @@ Transform<span class="Delimiter">.</span>push_back<span class="Delimiter">(</spa
   map&lt;string<span class="Delimiter">,</span> <span class="Normal">int</span>&gt; offset<span class="Delimiter">;</span>
   <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; SIZE<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>steps<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
     <span class="Normal">const</span> instruction&amp; inst = get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>steps<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">);</span>
-    <span class="Normal">if</span> <span class="Delimiter">(</span>!inst<span class="Delimiter">.</span>label<span class="Delimiter">.</span>empty<span class="Delimiter">()</span> &amp;&amp; inst<span class="Delimiter">.</span>label<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)</span> == <span class="Constant">'+'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>starts_with<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>label<span class="Delimiter">,</span> <span class="Constant">&quot;+&quot;</span><span class="Delimiter">))</span> <span class="Delimiter">{</span>
       <span class="Normal">if</span> <span class="Delimiter">(</span>!contains_key<span class="Delimiter">(</span>offset<span class="Delimiter">,</span> inst<span class="Delimiter">.</span>label<span class="Delimiter">))</span> <span class="Delimiter">{</span>
         put<span class="Delimiter">(</span>offset<span class="Delimiter">,</span> inst<span class="Delimiter">.</span>label<span class="Delimiter">,</span> i<span class="Delimiter">);</span>
       <span class="Delimiter">}</span>
@@ -123,7 +123,7 @@ Transform<span class="Delimiter">.</span>push_back<span class="Delimiter">(</spa
 <span class="Delimiter">}</span>
 
 <span class="Normal">bool</span> is_jump_target<span class="Delimiter">(</span>string label<span class="Delimiter">)</span> <span class="Delimiter">{</span>
-  <span class="Identifier">return</span> label<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)</span> == <span class="Constant">'+'</span><span class="Delimiter">;</span>
+  <span class="Identifier">return</span> starts_with<span class="Delimiter">(</span>label<span class="Delimiter">,</span> <span class="Constant">&quot;+&quot;</span><span class="Delimiter">);</span>
 <span class="Delimiter">}</span>
 
 <span class="Delimiter">:(scenario break_to_label)</span>