Skip to content

Commit 283e475

Browse files
committed
doc: bool array Set add comment
1 parent aeb513b commit 283e475

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/bool_array/array.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ func (x *BoolArray) Set(index int, v bool) *BoolArray {
5959
byteValue := byte(if_expression.Return(v, 1, 0))
6060
// 除了offset其它位置都原样拷贝
6161
oldByte := x.values[targetIndex] ^ (1 << offset)
62+
// 然后再把offset位置的新的值设置上
6263
newByte := oldByte | (byteValue << offset)
6364
x.values[targetIndex] = newByte
6465
return x

0 commit comments

Comments
 (0)