Remove a number of uses of forEach.

This commit is contained in:
Brent Simmons
2024-11-17 22:08:44 -08:00
parent 16d8b0066e
commit c1c4c8b1b6
14 changed files with 45 additions and 32 deletions

View File

@@ -13,7 +13,9 @@ extension Array where Element == CGRect {
func maxY() -> CGFloat {
var y: CGFloat = 0.0
self.forEach { y = Swift.max(y, $0.maxY) }
for oneRect in self {
y = Swift.max(y, oneRect.maxY)
}
return y
}