Small speed improvement int trim by using stack (and DFS) instead of queue (and BFS) for remove and collapse, finally fix the unknown escape '\*' error
This commit is contained in:
@@ -24,6 +24,10 @@ obj stack<T> (Object, Serializable) {
|
||||
data.construct()
|
||||
return this
|
||||
}
|
||||
fun construct(ammt: int): *stack<T> {
|
||||
data.construct(ammt)
|
||||
return this
|
||||
}
|
||||
fun copy_construct(other: *stack<T>) {
|
||||
data.copy_construct(&other->data)
|
||||
}
|
||||
@@ -59,6 +63,9 @@ obj stack<T> (Object, Serializable) {
|
||||
fun size(): int {
|
||||
return data.size
|
||||
}
|
||||
fun available(): int {
|
||||
return data.available
|
||||
}
|
||||
fun empty():bool {
|
||||
return data.size == 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user