about summary refs log tree commit diff stats
path: root/041jump_target.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-03-13 20:26:47 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-03-13 20:26:47 -0700
commitb24eb4766ad12eceaafa2ee0d620e070e21a3293 (patch)
treed7efc84bce7cf75fa18792d02bceb15480690a2d /041jump_target.cc
parent95b2a140094697dec176167154f9b3b31c2ef70f (diff)
downloadmu-b24eb4766ad12eceaafa2ee0d620e070e21a3293.tar.gz
2773 - switch to 'int'
This should eradicate the issue of 2771.
Diffstat (limited to '041jump_target.cc')
-rw-r--r--041jump_target.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/041jump_target.cc b/041jump_target.cc
index f58ff3d1..1976084d 100644
--- a/041jump_target.cc
+++ b/041jump_target.cc
@@ -23,8 +23,8 @@ Transform.push_back(transform_labels);  // idempotent
 
 :(code)
 void transform_labels(const recipe_ordinal r) {
-  map<string, long long int> offset;
-  for (long long int i = 0; i < SIZE(get(Recipe, r).steps); ++i) {
+  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 (!contains_key(offset, inst.label)) {
@@ -37,7 +37,7 @@ void transform_labels(const recipe_ordinal r) {
       }
     }
   }
-  for (long long int i = 0; i < SIZE(get(Recipe, r).steps); ++i) {
+  for (int i = 0; i < SIZE(get(Recipe, r).steps); ++i) {
     instruction& inst = get(Recipe, r).steps.at(i);
     if (inst.name == "jump") {
       if (inst.ingredients.empty()) {
@@ -66,7 +66,7 @@ void transform_labels(const recipe_ordinal r) {
 }
 
 :(code)
-void replace_offset(reagent& x, /*const*/ map<string, long long int>& offset, const long long int current_offset, const recipe_ordinal r) {
+void replace_offset(reagent& x, /*const*/ map<string, int>& offset, const int current_offset, const recipe_ordinal r) {
   if (!is_literal(x)) {
     raise << maybe(get(Recipe, r).name) << "jump target must be offset or label but is " << x.original_string << '\n' << end();
     x.set_value(0);  // no jump by default