summaryrefslogtreecommitdiff
path: root/tools/codegen/src
diff options
context:
space:
mode:
author Aurimas Liutikas <aurimas@google.com> 2021-05-17 17:41:41 +0000
committer Aurimas Liutikas <aurimas@google.com> 2021-05-17 17:41:41 +0000
commitb715c4d7301d45b8e2ff0308ee6eefc6ffdee2f0 (patch)
tree9c0dafc4fee3f99c7236788cd46bb9eb1f366151 /tools/codegen/src
parentc5b4071877530ba3eb6ce5f55fc8c101ea1f35e4 (diff)
Revert^2 "Fix incompatibilities with Kotlin 1.5.0"
c5b4071877530ba3eb6ce5f55fc8c101ea1f35e4 Change-Id: I1fc09f028411cce8bdaa9eec68eaf88116f2143f
Diffstat (limited to 'tools/codegen/src')
-rw-r--r--tools/codegen/src/com/android/codegen/Utils.kt4
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")
}