2
0
mirror of https://github.com/junegunn/fzf synced 2024-11-05 00:00:27 +00:00
fzf/src/result_x86.go
2022-03-29 21:23:45 +09:00

17 lines
364 B
Go

//go:build 386 || amd64
package fzf
import "unsafe"
func compareRanks(irank Result, jrank Result, tac bool) bool {
left := *(*uint64)(unsafe.Pointer(&irank.points[0]))
right := *(*uint64)(unsafe.Pointer(&jrank.points[0]))
if left < right {
return true
} else if left > right {
return false
}
return (irank.item.Index() <= jrank.item.Index()) != tac
}