mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
Fix fail on go1.12
This commit is contained in:
parent
7d8bee11ca
commit
ec246695c5
1 changed files with 2 additions and 2 deletions
|
|
@ -844,7 +844,7 @@ func (s *bytesFilter) Add(b []byte) {
|
||||||
m = l
|
m = l
|
||||||
}
|
}
|
||||||
for i := 0; i < m; i++ {
|
for i := 0; i < m; i++ {
|
||||||
s.chars[b[i]] |= 1 << i
|
s.chars[b[i]] |= 1 << uint8(i)
|
||||||
}
|
}
|
||||||
h := bytesHash(b) % uint64(len(s.slots))
|
h := bytesHash(b) % uint64(len(s.slots))
|
||||||
slot := s.slots[h]
|
slot := s.slots[h]
|
||||||
|
|
@ -876,7 +876,7 @@ func (s *bytesFilter) Contains(b []byte) bool {
|
||||||
m = l
|
m = l
|
||||||
}
|
}
|
||||||
for i := 0; i < m; i++ {
|
for i := 0; i < m; i++ {
|
||||||
if (s.chars[b[i]] & (1 << i)) == 0 {
|
if (s.chars[b[i]] & (1 << uint8(i))) == 0 {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue