Skip to content

Fixed compiler warnings #788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class Solution {
}

internal class Pair(var key: Int, var `val`: Int) : Comparable<Pair> {
override fun compareTo(p: Pair): Int {
return `val` * p.key - key * p.`val`
override fun compareTo(other: Pair): Int {
return `val` * other.key - key * other.`val`
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ class Solution {
cnt = c
}

override fun compareTo(o: RC): Int {
if (cnt != o.cnt) {
return cnt - o.cnt
override fun compareTo(other: RC): Int {
if (cnt != other.cnt) {
return cnt - other.cnt
}
return `val` - o.`val`
return `val` - other.`val`
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ class Solution {
}

private class Pair(val x: Int, val y: Int) : Comparable<Pair> {
override fun compareTo(p: Pair): Int {
return if (x == p.x) y - p.y else x - p.x
override fun compareTo(other: Pair): Int {
return if (x == other.x) y - other.y else x - other.x
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ internal class SolutionTest {
fun remainingMethods3() {
assertThat<List<Int>>(
Solution().remainingMethods(3, 2, arrayOf<IntArray>(intArrayOf(1, 2), intArrayOf(0, 1), intArrayOf(2, 0))),
equalTo<List<out Any>>(listOf<Any>()),
equalTo<List<Int>>(listOf<Int>()),
)
}
}