more efficient particles

Former-commit-id: 56dad88ecd715ad6e357e33b903851a47a358dcd
Former-commit-id: c85c0b759a447c0461563d98156f59879fa95db2
This commit is contained in:
Song Minjae
2017-01-22 04:13:45 +09:00
parent 56a012d843
commit 2131e86e76
22 changed files with 135 additions and 66 deletions

View File

@@ -47,7 +47,7 @@ class HistoryArray<T>(val historyMax: Int) {
/**
* Iterate from latest to oldest
*/
fun forEach(action: Consumer<T?>) = history.forEach(action)
fun forEach(action: (T?) -> Unit) = history.forEach(action)
val latest: T?
get() = this[0]