Cleanup deprecated symbol usages in testData

This commit is contained in:
Ilya Gorbunov
2016-01-16 20:10:40 +03:00
parent eefbd72a64
commit 25c4453dc5
403 changed files with 933 additions and 921 deletions
@@ -72,4 +72,4 @@ fun bottlesOfBeer(count: Int): String =
// From the std package
// This is an extension property, i.e. a property that is defined for the
// type Array<T>, but does not sit inside the class Array
fun <T> Array<T>.isEmpty() = size() == 0
fun <T> Array<T>.isEmpty() = size == 0
@@ -81,7 +81,7 @@ abstract class Tag(val name: String) : Element() {
private fun renderAttributes(): String? {
val builder = StringBuilder()
for (a in attributes.keySet()) {
for (a in attributes.keys) {
builder.append(" $a=\"${attributes[a]}\"")
}
return builder.toString()
+5 -5
View File
@@ -124,15 +124,15 @@ fun makeField(s: String): Field {
val lines: List<String> = s.split("\n")
val w = Collections.max<String>(lines.toList(), comparator<String> { o1, o2 ->
val l1: Int = o1.length()
val l2 = o2.length()
val l1: Int = o1.length
val l2 = o2.length
l1 - l2
})!!
val data = Array(lines.size()) { Array(w.length()) { false } }
val data = Array(lines.size) { Array(w.length) { false } }
// workaround
for (i in data.indices) {
data[i] = Array(w.length()) { false }
data[i] = Array(w.length) { false }
for (j in data[i].indices)
data[i][j] = false
}
@@ -144,5 +144,5 @@ fun makeField(s: String): Field {
}
}
return Field(w.length(), lines.size()) { i, j -> data[i][j] }
return Field(w.length, lines.size) { i, j -> data[i][j] }
}