Skip to content

Commit

Permalink
Use reserveCapacity
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriyvan committed Oct 18, 2023
1 parent 5a91bad commit d1556dc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/geometrize/Shapes/QuadraticBezier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public final class QuadraticBezier: Shape {
var lines: [Scanline] = []
let pointCount = 20
var points: [Point<Int>] = []
points.reserveCapacity(pointCount)
for i in 0...pointCount {
let t = Double(i) / Double(pointCount)
let tp = 1.0 - t
Expand Down

0 comments on commit d1556dc

Please sign in to comment.