mirror of
https://github.com/gbdev/rgbds.git
synced 2026-09-04 12:58:38 +00:00
Use Procedure concept to type-check decantOn lambda
This commit is contained in:
@@ -279,7 +279,7 @@ static void decant(std::vector<AssignedSets> &assignments, std::vector<ColorSet>
|
|||||||
assume(!assignments.empty());
|
assume(!assignments.empty());
|
||||||
|
|
||||||
// "Decanting" is the process of moving all *things* that can fit in a lower index there
|
// "Decanting" is the process of moving all *things* that can fit in a lower index there
|
||||||
auto decantOn = [&assignments](auto const &tryDecanting) {
|
auto decantOn = [&assignments](Procedure<AssignedSets &, AssignedSets &> auto tryDecanting) {
|
||||||
// No need to attempt decanting on palette #0, as there are no palettes to decant to
|
// No need to attempt decanting on palette #0, as there are no palettes to decant to
|
||||||
for (size_t from = assignments.size(); --from;) {
|
for (size_t from = assignments.size(); --from;) {
|
||||||
// Scan all palettes before this one
|
// Scan all palettes before this one
|
||||||
|
|||||||
Reference in New Issue
Block a user