| 12 | } |
| 13 | |
| 14 | Unitset RegionInterface::getUnits(const UnitFilter &pred) const |
| 15 | { |
| 16 | return Broodwar->getUnitsInRectangle(this->getBoundsLeft(), |
| 17 | this->getBoundsTop(), |
| 18 | this->getBoundsRight(), |
| 19 | this->getBoundsBottom(), |
| 20 | [&](Unit u){ return u->getRegion() == this && (!pred.isValid() || pred(u)); }); |
| 21 | } |
| 22 | } |