[FIR] Fix table rendering

This commit is contained in:
Simon Ogorodnik
2019-08-30 16:51:25 +03:00
parent 438c90b477
commit 99972a08a1
2 changed files with 1 additions and 2 deletions
@@ -287,7 +287,6 @@ class FirResolveBench(val withProgress: Boolean) {
timeCell(totalTime, fractionDigits = 0)
timeCell(totalTime / averageFiles)
cell("$averageFiles")
cell("$averageFiles")
timeCell(totalCpuTime, fractionDigits = 0)
timeCell(totalUserTime)
timeCell(totalGcTime, inputUnit = TableTimeUnit.MS)
@@ -66,7 +66,7 @@ class RTableContext {
fun printout(out: Appendable) {
val colSize = IntArray(cols) { index ->
data.filterIsInstance<Row.Data>().fold(0) { acc, row -> maxOf(acc, row.cells[index].text.length) }
data.filterIsInstance<Row.Data>().fold(0) { acc, row -> maxOf(acc, row.cells.getOrNull(index)?.text?.length ?: 0) }
}