mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
bitfield: change [0;n]
to [0].repeat(n)
This commit is contained in:
parent
6edc25f512
commit
c1eb714a7f
@ -112,7 +112,7 @@ pub fn new(size int) BitField {
|
||||
output := BitField{
|
||||
size: size
|
||||
//field: *u32(calloc(bitnslots(size) * SLOT_SIZE / 8))
|
||||
field: [u32(0); bitnslots(size)]
|
||||
field: [u32(0)].repeat(bitnslots(size))
|
||||
}
|
||||
return output
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user