Merge pull request #1712 from seebs/seebs/btree

Ensure btree comparison doesn't fail for smallish N

(Which is to say, differences between values exceeding the max value
of int.)
This commit is contained in:
seebs 2018-11-05 11:53:41 -06:00 • committed by GitHub
commit dde7551b88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -75,7 +75,7 @@ type (
// 0 if a == b
// > 0 if a > b
//
Cmp func(a, b uint64) int
Cmp func(a, b uint64) int64
d struct { // data page
c int

View file

@ -23,8 +23,8 @@ import (
"github.com/pilosa/pilosa/roaring"
)
func cmp(a, b uint64) int {
return int(a - b)
func cmp(a, b uint64) int64 {
return int64(a - b)
}
type bTreeContainers struct {