Skip to content
Myr

result_others.go

This file

Path

src/result_others.go

20 lines · 490 bytes · Go

Last changed by

Not known.

History of this file

Take it

1//go:build !386 && !amd64 && !arm6423package fzf45func 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 true11		} else if left > right {12			return false13		}14	}15	return (irank.item.Index() <= jrank.item.Index()) != tac16}1718func sortKey(r *Result) uint64 {19	return uint64(r.points[0]) | uint64(r.points[1])<<16 | uint64(r.points[2])<<32 | uint64(r.points[3])<<4820}