about summary refs log tree commit diff stats
path: root/043space.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 /043space.cc
parent6f8f9fb53b5a7ef26496d496a4b93266c78d6332 (diff)
downloadmu-ac0e9db526dc15cf91f4c45c4586ddcc19e9708c.tar.gz
1391 - avoid unsigned integers
Diffstat (limited to '043space.cc')
-rw-r--r--043space.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/043space.cc b/043space.cc
index ec63e19a..494e8215 100644
--- a/043space.cc
+++ b/043space.cc
@@ -26,7 +26,7 @@ recipe main [
 +mem: storing 34 in location 8
 
 :(before "End call Fields")
-index_t default_space;
+long long int default_space;
 :(replace "call(recipe_number r) :running_recipe(r)")
 call(recipe_number r) :running_recipe(r), running_step_index(0), next_ingredient_to_process(0), default_space(0) {}
 
@@ -93,14 +93,14 @@ tmp.properties.push_back(pair<string, vector<string> >("raw", vector<string>()))
 //:: helpers
 
 :(code)
-index_t space_base(const reagent& x) {
+long long int space_base(const reagent& x) {
   return Current_routine->calls.front().default_space;
 }
 
-index_t address(index_t offset, index_t base) {
+long long int address(long long int offset, long long int base) {
   if (base == 0) return offset;  // raw
 //?   cout << base << '\n'; //? 2
-  if (offset >= static_cast<index_t>(Memory[base])) {
+  if (offset >= static_cast<long long int>(Memory[base])) {
     // todo: test
     raise << "location " << offset << " is out of bounds " << Memory[base] << '\n';
   }
@@ -109,7 +109,7 @@ index_t address(index_t offset, index_t base) {
 
 :(after "void write_memory(reagent x, vector<double> data)")
   if (x.name == "default-space") {
-    assert(data.size() == 1);
+    assert(scalar(data));
     Current_routine->calls.front().default_space = data.at(0);
 //?     cout << "AAA " << Current_routine->calls.front().default_space << '\n'; //? 1
     return;