From 5b59577e00a59f06e729847435586f617ab832a3 Mon Sep 17 00:00:00 2001 From: vashish1 Date: Fri, 8 May 2020 19:57:35 +0530 Subject: performed explicit conversions(needed) --- plumbing/object/rename.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plumbing/object/rename.go') 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<