about summary refs log tree commit diff stats
path: root/034exclusive_container.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-17 02:22:41 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-17 02:22:41 -0700
commitac0e9db526dc15cf91f4c45c4586ddcc19e9708c (patch)
treeb5820975a254965d9963fda26d1a3d6644885e58 /034exclusive_container.cc
parent6f8f9fb53b5a7ef26496d496a4b93266c78d6332 (diff)
downloadmu-ac0e9db526dc15cf91f4c45c4586ddcc19e9708c.tar.gz
1391 - avoid unsigned integers
Diffstat (limited to '034exclusive_container.cc')
-rw-r--r--034exclusive_container.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/034exclusive_container.cc b/034exclusive_container.cc
index 6dc7a82b..6d8e3932 100644
--- a/034exclusive_container.cc
+++ b/034exclusive_container.cc
@@ -11,15 +11,15 @@ type_number tmp = Type_number["number-or-point"] = Next_type_number++;
 Type[tmp].size = 2;
 Type[tmp].kind = exclusive_container;
 Type[tmp].name = "number-or-point";
-//? cout << tmp << ": " << Type[tmp].elements.size() << '\n'; //? 1
+//? cout << tmp << ": " << SIZE(Type[tmp].elements) << '\n'; //? 1
 vector<type_number> t1;
 t1.push_back(number);
 Type[tmp].elements.push_back(t1);
-//? cout << Type[tmp].elements.size() << '\n'; //? 1
+//? cout << SIZE(Type[tmp].elements) << '\n'; //? 1
 vector<type_number> t2;
 t2.push_back(point);
 Type[tmp].elements.push_back(t2);
-//? cout << Type[tmp].elements.size() << '\n'; //? 1
+//? cout << SIZE(Type[tmp].elements) << '\n'; //? 1
 //? cout << "point: " << point << '\n'; //? 1
 Type[tmp].element_names.push_back("i");
 Type[tmp].element_names.push_back("p");
@@ -43,10 +43,10 @@ if (t.kind == exclusive_container) {
   // (So like containers, it can't contain arrays.)
 //?   cout << "--- " << types.at(0) << ' ' << t.size << '\n'; //? 1
 //?   cout << "point: " << Type_number["point"] << " " << Type[Type_number["point"]].name << " " << Type[Type_number["point"]].size << '\n'; //? 1
-//?   cout << t.name << ' ' << t.size << ' ' << t.elements.size() << '\n'; //? 1
-  size_t result = 0;
-  for (index_t i = 0; i < t.size; ++i) {
-    size_t tmp = size_of(t.elements.at(i));
+//?   cout << t.name << ' ' << t.size << ' ' << SIZE(t.elements) << '\n'; //? 1
+  long long int result = 0;
+  for (long long int i = 0; i < t.size; ++i) {
+    long long int tmp = size_of(t.elements.at(i));
 //?     cout << i << ": " << t.elements.at(i).at(0) << ' ' << tmp << ' ' << result << '\n'; //? 1
     if (tmp > result) result = tmp;
   }
@@ -89,13 +89,13 @@ Recipe_number["maybe-convert"] = MAYBE_CONVERT;
 :(before "End Primitive Recipe Implementations")
 case MAYBE_CONVERT: {
   reagent base = canonize(current_instruction().ingredients.at(0));
-  index_t base_address = base.value;
+  long long int base_address = base.value;
   type_number base_type = base.types.at(0);
   assert(Type[base_type].kind == exclusive_container);
   assert(isa_literal(current_instruction().ingredients.at(1)));
-  index_t tag = current_instruction().ingredients.at(1).value;
+  long long int tag = current_instruction().ingredients.at(1).value;
   long long int result;
-  if (tag == static_cast<index_t>(Memory[base_address])) {
+  if (tag == static_cast<long long int>(Memory[base_address])) {
     result = base_address+1;
   }
   else {