diff options
| author | 2021-05-11 20:25:59 +0000 | |
|---|---|---|
| committer | 2021-05-11 20:25:59 +0000 | |
| commit | 70ba49b0e51e03574f1d2570798daae6149870c3 (patch) | |
| tree | 598723e552fb0d6e87e76fe2ff00aeb2ef5ad46d /tools/codegen/src | |
| parent | 4f7105a12b2339fbfb559035b21c378028552dfe (diff) | |
| parent | 600dcaf90897c260621cf242079d032663aacf10 (diff) | |
Merge "Fix incompatibilities with Kotlin 1.5.0" am: 600dcaf908
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1697314
Change-Id: I32032ee50ee243f404b43fa304419c83f5ce0960
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") } |