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

parser: array init: []string => []string{}

This commit is contained in:
Alexander Medvednikov
2020-04-26 09:17:13 +02:00
parent b898970031
commit 3ab8dc0092
30 changed files with 181 additions and 184 deletions

View File

@ -531,7 +531,7 @@ pub fn compare_f32(a, b &f32) int {
// a.pointers() returns a new array, where each element
// is the address of the corresponding element in a.
pub fn (a array) pointers() []voidptr {
mut res := []voidptr
mut res := []voidptr{}
for i in 0..a.len {
res << byteptr(a.data) + i * a.element_size
}