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:
2
game.cpp
2
game.cpp
@@ -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;
|
||||
|
Reference in New Issue
Block a user