feat: remove guard condition

This commit is contained in:
dscyrescotti
2024-06-25 17:01:10 +07:00
parent e3183aa4b2
commit 32af33f617
3 changed files with 0 additions and 9 deletions

View File

@@ -174,9 +174,6 @@ extension GraphicContext {
extension GraphicContext: Drawable {
func prepare(device: MTLDevice) {
guard vertexBuffer == nil else {
return
}
vertexCount = vertices.count
vertexBuffer = device.makeBuffer(bytes: vertices, length: vertexCount * MemoryLayout<ViewPortVertex>.stride, options: [])
}

View File

@@ -30,9 +30,6 @@ class GridContext {
extension GridContext: Drawable {
func prepare(device: MTLDevice) {
guard vertexBuffer == nil else {
return
}
vertexBuffer = device.makeBuffer(bytes: vertices, length: vertexCount * MemoryLayout<GridVertex>.stride, options: [])
}

View File

@@ -36,9 +36,6 @@ class ViewPortContext {
extension ViewPortContext: Drawable {
func prepare(device: MTLDevice) {
guard vertexBuffer == nil else {
return
}
vertexBuffer = device.makeBuffer(bytes: vertices, length: vertexCount * MemoryLayout<ViewPortVertex>.stride, options: [])
}