1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-21 17:07:40 +00:00

pass lambdas to functions by reference, not by value zenorogue/hyperrogue#25

This commit is contained in:
Zeno Rogue
2018-06-12 22:17:08 +02:00
parent c23d893df2
commit 520e5e5dbb
3 changed files with 5 additions and 4 deletions

View File

@@ -3892,7 +3892,7 @@ int pickDownDirection(cell *c, flagtype mf) {
}
template<class T>
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;