1
0
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:
Unknown User 2019-10-08 12:24:02 +02:00 committed by Alexander Medvednikov
parent 6edc25f512
commit c1eb714a7f

View File

@ -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
}