| 1 |
//go:build !386 && !amd64 && !arm64 |
| 2 |
|
| 3 |
package fzf |
| 4 |
|
| 5 |
func compareRanks(irank Result, jrank Result, tac bool) bool { |
| 6 |
for idx := 3; idx >= 0; idx-- { |
| 7 |
left := irank.points[idx] |
| 8 |
right := jrank.points[idx] |
| 9 |
if left < right { |
| 10 |
return true |
| 11 |
} else if left > right { |
| 12 |
return false |
| 13 |
} |
| 14 |
} |
| 15 |
return (irank.item.Index() <= jrank.item.Index()) != tac |
| 16 |
} |
| 17 |
|
| 18 |
func sortKey(r *Result) uint64 { |
| 19 |
return uint64(r.points[0]) | uint64(r.points[1])<<16 | uint64(r.points[2])<<32 | uint64(r.points[3])<<48 |
| 20 |
} |