sortedByDescending { key } instead of sortedBy { -key }

This commit is contained in:
Ilya Gorbunov
2015-10-06 22:01:07 +03:00
parent 17fc1d9562
commit a8830b5816
2 changed files with 2 additions and 2 deletions
@@ -142,7 +142,7 @@ public fun <TElement : JetElement> createByPattern(pattern: String, vararg args:
.flatMap { it.value }
.map { it.range }
.filterNot { it.isEmpty() }
.sortedBy { -it.getStartOffset() }
.sortedByDescending { it.startOffset }
// reformat whole text except for String arguments (as they can contain user's formatting to be preserved)
if (stringPlaceholderRanges.none()) {
@@ -143,7 +143,7 @@ class OverloadReducer(
private fun dropOverloadsForDefaultValues(equivalenceMap: Map<PsiMethod, EquivalentOverloadInfo>) {
val dropCandidates = equivalenceMap
.map { it.key }
.sortedBy { -it.getParameterList().getParametersCount() } // we will try to drop them starting from ones with more parameters
.sortedByDescending { it.parameterList.parametersCount } // we will try to drop them starting from ones with more parameters
DropCandidatesLoop@
for (method in dropCandidates) {