mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: only allow &u8
with byteptr
and itself (#18146)
This commit is contained in:
@ -124,7 +124,7 @@ fn (mut state AppState) worker(id int, input chan MandelChunk, ready chan bool)
|
||||
|
||||
fn (mut state AppState) draw() {
|
||||
mut istream_image := state.gg.get_cached_image_by_idx(state.iidx)
|
||||
istream_image.update_pixel_data(state.pixels)
|
||||
istream_image.update_pixel_data(unsafe { &u8(state.pixels) })
|
||||
size := gg.window_size()
|
||||
state.gg.draw_image(0, 0, size.width, size.height, istream_image)
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ fn (mut state AppState) update() {
|
||||
|
||||
fn (mut state AppState) draw() {
|
||||
mut istream_image := state.gg.get_cached_image_by_idx(state.istream_idx)
|
||||
istream_image.update_pixel_data(&state.pixels)
|
||||
istream_image.update_pixel_data(unsafe { &u8(&state.pixels) })
|
||||
size := gg.window_size()
|
||||
state.gg.draw_image(0, 0, size.width, size.height, istream_image)
|
||||
}
|
||||
|
@ -59,6 +59,6 @@ fn frame(mut app App) {
|
||||
|
||||
fn (mut app App) draw() {
|
||||
mut istream_image := app.gg.get_cached_image_by_idx(app.iidx)
|
||||
istream_image.update_pixel_data(&app.pixels[0])
|
||||
istream_image.update_pixel_data(unsafe { &u8(&app.pixels[0]) })
|
||||
app.gg.draw_image(0, 0, app.args.grid.width, app.args.grid.height, istream_image)
|
||||
}
|
||||
|
Reference in New Issue
Block a user