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

examples: fix compilation with -prod

This commit is contained in:
Alexander Medvednikov
2021-04-23 14:48:04 +03:00
parent cf497623dc
commit 0567cbe431
6 changed files with 23 additions and 20 deletions

View File

@ -23,6 +23,7 @@ pub fn (a &A2D) set(x int, y int, newval int) {
mut e := &int(0)
e = a.data + y * a.maxx + x
*e = newval
_ = e // TODO compiler bug, this is not necessary
}
}
@ -31,6 +32,7 @@ pub fn (a &A2D) get(x int, y int) int {
unsafe {
mut e := &int(0)
e = a.data + y * a.maxx + x
_ = e
return *e
}
}