File: tree_node_test.go

package info (click to toggle)
golang-github-kentik-patricia 1.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,860 kB
  • sloc: makefile: 54
file content (17 lines) | stat: -rw-r--r-- 316 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package generics_tree

// Clears the bit at pos in n.
func clearBit32(n uint32, pos uint32) uint32 {
	pos = 32 - pos
	mask := uint32(^(1 << pos))
	n &= mask
	return n
}

// Clears the bit at pos in n.
func clearBit64(n uint64, pos uint64) uint64 {
	pos = 64 - pos
	mask := uint64(^(1 << pos))
	n &= mask
	return n
}