Remove UniformStorage protocol
This commit is contained in:
parent
19dea0115e
commit
f56faaace5
|
|
@ -5,7 +5,7 @@
|
||||||
// Created by Christian Treffs on 28.10.17.
|
// Created by Christian Treffs on 28.10.17.
|
||||||
//
|
//
|
||||||
|
|
||||||
public class ManagedContiguousArray<Element>: UniformStorage {
|
public class ManagedContiguousArray<Element> {
|
||||||
public typealias Index = Int
|
public typealias Index = Int
|
||||||
private let chunkSize: Int
|
private let chunkSize: Int
|
||||||
private var size: Int = 0
|
private var size: Int = 0
|
||||||
|
|
@ -85,7 +85,7 @@ public class ManagedContiguousArray<Element>: UniformStorage {
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Equatable
|
// MARK: - Equatable
|
||||||
extension ManagedContiguousArray: Equatable where ManagedContiguousArray.Element: Equatable {
|
extension ManagedContiguousArray: Equatable where Element: Equatable {
|
||||||
public static func == (lhs: ManagedContiguousArray<Element>, rhs: ManagedContiguousArray<Element>) -> Bool {
|
public static func == (lhs: ManagedContiguousArray<Element>, rhs: ManagedContiguousArray<Element>) -> Bool {
|
||||||
return lhs.store == rhs.store
|
return lhs.store == rhs.store
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
//
|
|
||||||
// UniformStorage.swift
|
|
||||||
// FirebladeECS
|
|
||||||
//
|
|
||||||
// Created by Christian Treffs on 14.02.19.
|
|
||||||
//
|
|
||||||
|
|
||||||
public protocol UniformStorage: class {
|
|
||||||
associatedtype Element
|
|
||||||
associatedtype Index
|
|
||||||
|
|
||||||
var count: Int { get }
|
|
||||||
|
|
||||||
@discardableResult
|
|
||||||
func insert(_ element: Element, at index: Index) -> Bool
|
|
||||||
func contains(_ index: Index) -> Bool
|
|
||||||
func get(at index: Index) -> Element?
|
|
||||||
@discardableResult
|
|
||||||
func remove(at index: Index) -> Bool
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue