Add debug description & make sparse set arrays œusableFromInline

This commit is contained in:
Christian Treffs 2019-02-21 13:29:45 +01:00
parent 0b930b7631
commit df7f36ea5c
2 changed files with 9 additions and 2 deletions

View File

@ -99,3 +99,10 @@ extension Nexus {
delegate?.nexusRecoverableErrorOccurred(message)
}
}
// MARK: - CustomDebugStringConvertible
extension Nexus: CustomDebugStringConvertible {
public var debugDescription: String {
return "Nexus<Entities:\(numEntities) Components:\(numComponents) Families:\(numFamilies)>"
}
}

View File

@ -14,8 +14,8 @@ open class UnorderedSparseSet<Element>: MutableCollection, RandomAccessCollectio
public let element: Element
}
public private(set) var dense: ContiguousArray<Entry>
public private(set) var sparse: [Index: Key]
@usableFromInline var dense: ContiguousArray<Entry>
@usableFromInline var sparse: [Index: Key]
public init() {
sparse = [Index: Key]()