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

sync.pool: fix pointer cast warning (#16902)

This commit is contained in:
MatejMagat305 2023-01-08 11:34:46 +01:00 committed by GitHub
parent a60f34e6dd
commit a99149334c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,7 +131,7 @@ pub fn (pool &PoolProcessor) get_result[T](idx int) T {
pub fn (pool &PoolProcessor) get_results[T]() []T {
mut res := []T{cap: pool.results.len}
for i in 0 .. pool.results.len {
res << *(&T(pool.results[i]))
res << unsafe { *(&T(pool.results[i])) }
}
return res
}