bitfield: change `[0;n]` to `[0].repeat(n)`

pull/2264/head
Unknown User 2019-10-08 12:24:02 +02:00 committed by Alexander Medvednikov
parent 6edc25f512
commit c1eb714a7f
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ pub fn new(size int) BitField {
output := BitField{ output := BitField{
size: size size: size
//field: *u32(calloc(bitnslots(size) * SLOT_SIZE / 8)) //field: *u32(calloc(bitnslots(size) * SLOT_SIZE / 8))
field: [u32(0); bitnslots(size)] field: [u32(0)].repeat(bitnslots(size))
} }
return output return output
} }