diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2020-05-10 12:08:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-10 12:08:14 +0200 |
commit | e4166c560bfa0bcdadd3197ad00365b4f1c027fb (patch) | |
tree | b7aa20548c25eb8da4501655dd155033442dbbc0 | |
parent | 79798d4a85b9389b28ef26b70944157d16fc205a (diff) | |
parent | 5b59577e00a59f06e729847435586f617ab832a3 (diff) | |
download | go-git-e4166c560bfa0bcdadd3197ad00365b4f1c027fb.tar.gz |
Merge pull request #57 from vashish1/Rename_Changed
plumbing: object, Fixed the ambiguous implicit conversions causing errors while building .
-rw-r--r-- | plumbing/object/rename.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plumbing/object/rename.go b/plumbing/object/rename.go index b0c62b2..35af1d6 100644 --- a/plumbing/object/rename.go +++ b/plumbing/object/rename.go @@ -709,7 +709,7 @@ func (i *similarityIndex) common(dst *similarityIndex) uint64 { } func (i *similarityIndex) add(key int, cnt uint64) error { - key = int(uint32(key) * 0x9e370001 >> 1) + key = int(uint32(key)*0x9e370001 >> 1) j := i.slot(key) for { @@ -769,11 +769,11 @@ func (i *similarityIndex) slot(key int) int { // We use 31 - hashBits because the upper bit was already forced // to be 0 and we want the remaining high bits to be used as the // table slot. - return int(uint32(key) >> (31 - i.hashBits)) + return int(uint32(key) >> uint(31 - i.hashBits)) } func shouldGrowAt(hashBits int) int { - return (1 << hashBits) * (hashBits - 3) / hashBits + return (1 << uint(hashBits)) * (hashBits - 3) / hashBits } func (i *similarityIndex) grow() error { @@ -788,7 +788,7 @@ func (i *similarityIndex) grow() error { // TODO(erizocosmico): find a way to check if it will OOM and return // errIndexFull instead. - i.hashes = make([]keyCountPair, 1<<i.hashBits) + i.hashes = make([]keyCountPair, 1<<uint(i.hashBits)) for _, v := range old { if v != 0 { |