diff options
| author | 2021-05-11 21:19:00 +0000 | |
|---|---|---|
| committer | 2021-05-11 21:19:00 +0000 | |
| commit | c61fdfd2d11e4261b333db4f5ac9845c5e5ed055 (patch) | |
| tree | 5eb9a9a595c70b01d5e1b61aef262731b2edc1d6 /tools/codegen/src | |
| parent | 585a63abbe5fbda7d4643f06e2a03250a88f3463 (diff) | |
| parent | 70ba49b0e51e03574f1d2570798daae6149870c3 (diff) | |
Merge "Fix incompatibilities with Kotlin 1.5.0" am: 600dcaf908 am: 70ba49b0e5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1697314
Change-Id: I5ba357b8fe77930d2602c436bafbcde841624fa0
Diffstat (limited to 'tools/codegen/src')
| -rw-r--r-- | tools/codegen/src/com/android/codegen/Utils.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/codegen/src/com/android/codegen/Utils.kt b/tools/codegen/src/com/android/codegen/Utils.kt index c19ae3b0b11f..a117aa09ab62 100644 --- a/tools/codegen/src/com/android/codegen/Utils.kt +++ b/tools/codegen/src/com/android/codegen/Utils.kt @@ -43,8 +43,8 @@ inline infix fun Int.times(action: () -> Unit) { * cccc dd */ fun Iterable<Pair<String, String>>.columnize(separator: String = " | "): String { - val col1w = map { (a, _) -> a.length }.max()!! - val col2w = map { (_, b) -> b.length }.max()!! + val col1w = map { (a, _) -> a.length }.maxOrNull()!! + val col2w = map { (_, b) -> b.length }.maxOrNull()!! return map { it.first.padEnd(col1w) + separator + it.second.padEnd(col2w) }.joinToString("\n") } |