Use SmartList for storing annotations in binary classes

Looks like in the most cases there are <= 1 annotations
in real declarations
This commit is contained in:
Denis Zharkov
2017-05-17 14:56:39 +03:00
parent 36ab31f2f7
commit c7e6f200da
4 changed files with 16 additions and 5 deletions
@@ -130,4 +130,11 @@ inline fun <T> measureTimeMillisWithResult(block: () -> T) : Pair<Long, T> {
val start = System.currentTimeMillis()
val result = block()
return Pair(System.currentTimeMillis() - start, result)
}
}
public fun <T> Iterable<Iterable<T>>.flattenTo(c: MutableList<T>): List<T> {
for (element in this) {
c.addAll(element)
}
return c
}