remove unneeded arguments

This commit is contained in:
Eric Mertens 2022-11-11 19:51:14 -08:00
parent 8a1bc011d7
commit 34a8e0d611

View File

@ -62,23 +62,23 @@ struct Neighbor2 {
auto operator()(C3 cd, auto f) const -> void { auto operator()(C3 cd, auto f) const -> void {
auto const [c,d] = cd; auto const [c,d] = cd;
auto left_neighbors = [&f](Coord c, std::int64_t d, auto k_, auto k) { auto left_neighbors = [&](auto k_, auto k) {
c = k_(c); auto c_ = k_(c);
if (c.x == 1 && c.y == 0) { if (c_.x == 1 && c_.y == 0) {
for (std::int64_t yi = -2; yi <= 2; yi++) { for (std::int64_t yi = -2; yi <= 2; yi++) {
f({k({2,yi}),d+1}); f({k({2,yi}),d+1});
} }
} else if (c.x > -2) { } else if (c_.x > -2) {
f({k(Left(c)),d}); f({k(Left(c_)),d});
} else { } else {
f({k({-1,0}),d-1}); f({k({-1,0}),d-1});
} }
}; };
auto id = [](Coord i) { return i; }; auto id = [](Coord i) { return i; };
left_neighbors(c, d, id, id); left_neighbors(id, id);
left_neighbors(c, d, Turn180, Turn180); left_neighbors(Turn180, Turn180);
left_neighbors(c, d, CW, CCW); left_neighbors(CW, CCW);
left_neighbors(c, d, CCW, CW); left_neighbors(CCW, CW);
} }
}; };