about summary refs log tree commit diff stats
path: root/033exclusive_container.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 /033exclusive_container.cc
parent95b2a140094697dec176167154f9b3b31c2ef70f (diff)
downloadmu-b24eb4766ad12eceaafa2ee0d620e070e21a3293.tar.gz
2773 - switch to 'int'
This should eradicate the issue of 2771.
Diffstat (limited to '033exclusive_container.cc')
-rw-r--r--033exclusive_container.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/033exclusive_container.cc b/033exclusive_container.cc
index 18c07f3a..453ed82f 100644
--- a/033exclusive_container.cc
+++ b/033exclusive_container.cc
@@ -34,11 +34,11 @@ def main [
 if (t.kind == EXCLUSIVE_CONTAINER) {
   // size of an exclusive container is the size of its largest variant
   // (So like containers, it can't contain arrays.)
-  long long int result = 0;
-  for (long long int i = 0; i < t.size; ++i) {
+  int result = 0;
+  for (int i = 0; i < t.size; ++i) {
     reagent tmp;
     tmp.type = new type_tree(*type);
-    long long int size = size_of(variant_type(tmp, i));
+    int size = size_of(variant_type(tmp, i));
     if (size > result) result = size;
   }
   // ...+1 for its tag.
@@ -115,14 +115,14 @@ case MAYBE_CONVERT: {
 case MAYBE_CONVERT: {
   reagent base = current_instruction().ingredients.at(0);
   canonize(base);
-  long long int base_address = base.value;
+  int base_address = base.value;
   if (base_address == 0) {
     raise << maybe(current_recipe_name()) << "tried to access location 0 in '" << to_string(current_instruction()) << "'\n" << end();
     break;
   }
-  long long int tag = current_instruction().ingredients.at(1).value;
-  long long int result;
-  if (tag == static_cast<long long int>(get_or_insert(Memory, base_address))) {
+  int tag = current_instruction().ingredients.at(1).value;
+  int result;
+  if (tag == static_cast<int>(get_or_insert(Memory, base_address))) {
     result = base_address+1;
   }
   else {
@@ -134,7 +134,7 @@ case MAYBE_CONVERT: {
 }
 
 :(code)
-const reagent variant_type(const reagent& canonized_base, long long int tag) {
+const reagent variant_type(const reagent& canonized_base, int tag) {
   assert(tag >= 0);
   assert(contains_key(Type, canonized_base.type->value));
   assert(!get(Type, canonized_base.type->value).name.empty());