about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--020run.cc2
-rw-r--r--031address.cc2
-rw-r--r--043space.cc4
-rw-r--r--046global.cc2
4 files changed, 5 insertions, 5 deletions
diff --git a/020run.cc b/020run.cc
index 3b9cd4d3..cdf265e9 100644
--- a/020run.cc
+++ b/020run.cc
@@ -262,7 +262,7 @@ vector<double> read_memory(reagent x) {
   return result;
 }
 
-void write_memory(reagent x, vector<double> data) {
+void write_memory(reagent x, const vector<double>& data) {
   if (!x.type) {
     raise << "can't write to " << to_string(x) << "; no type\n" << end();
     return;
diff --git a/031address.cc b/031address.cc
index 708f698d..c4228fdc 100644
--- a/031address.cc
+++ b/031address.cc
@@ -22,7 +22,7 @@ def main [
 ]
 +mem: storing 34 in location 2
 
-:(before "long long int base = x.value" following "void write_memory(reagent x, vector<double> data)")
+:(before "long long int base = x.value" following "void write_memory(reagent x, const vector<double>& data)")
 canonize(x);
 if (x.value == 0) {
   raise << "can't write to location 0 in '" << to_string(current_instruction()) << "'\n" << end();
diff --git a/043space.cc b/043space.cc
index f16240ca..c9a0e7dc 100644
--- a/043space.cc
+++ b/043space.cc
@@ -82,7 +82,7 @@ long long int address(long long int offset, long long int base) {
 
 //:: reads and writes to the 'default-space' variable have special behavior
 
-:(after "void write_memory(reagent x, vector<double> data)")
+:(after "void write_memory(reagent x, const vector<double>& data)")
   if (x.name == "default-space") {
     if (!scalar(data)
         || !x.type
@@ -188,7 +188,7 @@ if (curr.name == "new-default-space") {
       raise << "no space allocated for default-space in recipe " << current_recipe_name() << "; are you using names?\n" << end();
     return result;
   }
-:(after "void write_memory(reagent x, vector<double> data)")
+:(after "void write_memory(reagent x, const vector<double>& data)")
   if (x.name == "number-of-locals") {
     raise << maybe(current_recipe_name()) << "can't write to special name 'number-of-locals'\n" << end();
     return;
diff --git a/046global.cc b/046global.cc
index 5c294da3..2bd123ec 100644
--- a/046global.cc
+++ b/046global.cc
@@ -40,7 +40,7 @@ if (s == "global-space") return true;
 long long int global_space;
 :(before "End routine Constructor")
 global_space = 0;
-:(after "void write_memory(reagent x, vector<double> data)")
+:(after "void write_memory(reagent x, const vector<double>& data)")
   if (x.name == "global-space") {
     if (!scalar(data)
         || !x.type