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

all: fix remaining []array warnings

This commit is contained in:
yuyi
2020-04-26 22:25:54 +08:00
committed by GitHub
parent 9f4d498ff1
commit 2574dce174
21 changed files with 34 additions and 36 deletions

View File

@@ -178,7 +178,7 @@ pub fn (pool &PoolProcessor) get_int_item(idx int) int {
// TODO: uncomment, when generics work again
// get_results - can be called to get a list of type safe results.
//pub fn (pool &PoolProcessor) get_results<T>() []T {
// mut res := []T
// mut res := []T{}
// for i in 0 .. pool.results.len {
// res << *(&T(pool.results[i]))
// }
@@ -234,14 +234,14 @@ pub fn (pool mut PoolProcessor) work_on_items_i(items []int) {
}
pub fn (pool &PoolProcessor) get_results_s() []SResult {
mut res := []SResult
mut res := []SResult{}
for i in 0 .. pool.results.len {
res << *(&SResult(pool.results[i]))
}
return res
}
pub fn (pool &PoolProcessor) get_results_i() []IResult {
mut res := []IResult
mut res := []IResult{}
for i in 0 .. pool.results.len {
res << *(&IResult(pool.results[i]))
}