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:
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user