re-order to fix compilation

This commit is contained in:
Tim Felgentreff 2022-06-28 21:38:28 +02:00
parent 1d8c81d09a
commit 104d89de91

View file

@ -258,6 +258,16 @@ void SelectFixed(const Vec2i &ltPos, const Vec2i &rbPos, std::vector<CUnit *> &u
}
}
template <int selectMax = 0, typename Pred>
void Select(const Vec2i &ltPos, const Vec2i &rbPos, std::vector<CUnit *> &units, Pred pred)
{
Vec2i minPos = ltPos;
Vec2i maxPos = rbPos;
Map.FixSelectionArea(minPos, maxPos);
SelectFixed<selectMax>(minPos, maxPos, units, pred);
}
template <int selectMax = 0, typename Pred>
void SelectAroundUnit(const CUnit &unit, int range, std::vector<CUnit *> &around, Pred pred)
{
@ -269,16 +279,6 @@ void SelectAroundUnit(const CUnit &unit, int range, std::vector<CUnit *> &around
MakeAndPredicate(IsNotTheSameUnitAs(unit), pred));
}
template <int selectMax = 0, typename Pred>
void Select(const Vec2i &ltPos, const Vec2i &rbPos, std::vector<CUnit *> &units, Pred pred)
{
Vec2i minPos = ltPos;
Vec2i maxPos = rbPos;
Map.FixSelectionArea(minPos, maxPos);
SelectFixed<selectMax>(minPos, maxPos, units, pred);
}
template <typename Pred>
CUnit *FindUnit_IfFixed(const Vec2i &ltPos, const Vec2i &rbPos, Pred pred)
{