mirror of
https://github.com/dscyrescotti/Memola.git
synced 2026-05-11 02:10:05 +02:00
feat: remove guard condition
This commit is contained in:
@@ -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: [])
|
||||
}
|
||||
|
||||
@@ -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: [])
|
||||
}
|
||||
|
||||
|
||||
@@ -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: [])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user