1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vlib,cgen: cleanup array inits using `.repeat() instead of new init syntax

This commit is contained in:
Emily Hudson
2020-06-27 20:46:04 +01:00
committed by GitHub
parent 2669610be9
commit c84bafbdae
31 changed files with 52 additions and 53 deletions

View File

@@ -114,8 +114,8 @@ pub fn (mut pool PoolProcessor) work_on_pointers(items []voidptr) {
pool.results = []
pool.thread_contexts = []
pool.items << items
pool.results = [voidptr(0)].repeat(pool.items.len)
pool.thread_contexts << [voidptr(0)].repeat(pool.items.len)
pool.results = []voidptr{len:(pool.items.len)}
pool.thread_contexts << []voidptr{len:(pool.items.len)}
pool.waitgroup.add(njobs)
for i := 0; i < njobs; i++ {
if njobs > 1 {