diff --git a/game.cpp b/game.cpp index 2f5ecdc2..eddb812f 100644 --- a/game.cpp +++ b/game.cpp @@ -3892,7 +3892,7 @@ int pickDownDirection(cell *c, flagtype mf) { } template -cell *determinePush(cellwalker who, cell *c2, int subdir, T valid) { +cell *determinePush(cellwalker who, cell *c2, int subdir, const T& valid) { if(subdir != 1 && subdir != -1) { subdir = 1; static bool first = true; diff --git a/rogueviz-banachtarski.cpp b/rogueviz-banachtarski.cpp index ecbc9a5c..43d098be 100644 --- a/rogueviz-banachtarski.cpp +++ b/rogueviz-banachtarski.cpp @@ -48,7 +48,7 @@ bool test_uniq(cellwalker cw, int z, int lev, cell *par) { return true; } -template void recursively(cell *c, cell *c1, T t) { +template void recursively(cell *c, cell *c1, const T& t) { t(c); for(int i=0; itype; i++) if(c->mov[i] && c->spin(i) == 0 && c->mov[i] != c1) diff --git a/rogueviz.cpp b/rogueviz.cpp index 5ecb97a7..a1ad2ced 100644 --- a/rogueviz.cpp +++ b/rogueviz.cpp @@ -1619,7 +1619,7 @@ string cname() { return "coord-67.txt"; } -template function roguevizslide(char c, T t) { +template function roguevizslide(char c, const T& t) { return [c,t] (presmode mode) { patterns::canvasback = 0x101010; setCanvas(mode, c); @@ -1638,7 +1638,8 @@ template function roguevizslide(char c, T t) { }; } -template function roguevizslide_action(char c, T t, T1 act) { +template +function roguevizslide_action(char c, const T& t, const U& act) { return [c,t,act] (presmode mode) { patterns::canvasback = 0x101010; setCanvas(mode, c);