diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-09-11 18:07:29 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-09-11 18:17:46 -0700 |
commit | 555d95c1684c39937d0950b482413674618d92a3 (patch) | |
tree | 72c35cf68a51e2bc03914d4365a8dbe27a59caff /041jump_target.cc | |
parent | f7f40d32b023751bb34c3a5508b48edfb4eae18a (diff) | |
download | mu-555d95c1684c39937d0950b482413674618d92a3.tar.gz |
3327
Diffstat (limited to '041jump_target.cc')
-rw-r--r-- | 041jump_target.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/041jump_target.cc b/041jump_target.cc index 8ccd5625..4d09d897 100644 --- a/041jump_target.cc +++ b/041jump_target.cc @@ -26,7 +26,7 @@ void transform_labels(const recipe_ordinal r) { map<string, int> offset; for (int i = 0; i < SIZE(get(Recipe, r).steps); ++i) { const instruction& inst = get(Recipe, r).steps.at(i); - if (!inst.label.empty() && inst.label.at(0) == '+') { + if (starts_with(inst.label, "+")) { if (!contains_key(offset, inst.label)) { put(offset, inst.label, i); } @@ -88,7 +88,7 @@ void replace_offset(reagent& x, /*const*/ map<string, int>& offset, const int cu } bool is_jump_target(string label) { - return label.at(0) == '+'; + return starts_with(label, "+"); } :(scenario break_to_label) |