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

examples: fix unsafe 0

This commit is contained in:
Alexander Medvednikov
2022-06-26 07:12:15 +03:00
parent ca30397e7a
commit cb60392302
9 changed files with 12 additions and 12 deletions

View File

@ -31,7 +31,7 @@ fn (v &ViewRect) height() f64 {
struct AppState {
mut:
gg &gg.Context = 0
gg &gg.Context = unsafe { 0 }
iidx int
pixels &u32 = unsafe { vcalloc(pwidth * pheight * sizeof(u32)) }
npixels &u32 = unsafe { vcalloc(pwidth * pheight * sizeof(u32)) } // all drawing happens here, results are swapped at the end

View File

@ -9,7 +9,7 @@ const pbytes = 4
struct AppState {
mut:
gg &gg.Context = 0
gg &gg.Context = unsafe { 0 }
istream_idx int
pixels [pheight][pwidth]u32
}