mirror of
https://github.com/dscyrescotti/Memola.git
synced 2026-11-13 12:23:31 +01:00
feat: remove guard condition
This commit is contained in:
1 parent
e3183aa4b2
commit
32af33f617
3 files changed
-9
No files matched your search
@@ -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