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

checker: require unsafe for Struct(voidptr) casts

This commit is contained in:
Alexander Medvednikov
2023-01-06 09:28:01 +03:00
parent 0146509516
commit 868908b80d
25 changed files with 64 additions and 83 deletions

View File

@ -27,8 +27,7 @@ fn random_color() tui.Color {
}
}
fn event(e &tui.Event, x voidptr) {
mut app := &App(x)
fn event(e &tui.Event, mut app App) {
match e.typ {
.mouse_down {
app.is_drag = true
@ -60,8 +59,7 @@ fn event(e &tui.Event, x voidptr) {
app.redraw = true
}
fn frame(x voidptr) {
mut app := &App(x)
fn frame(mut app App) {
if !app.redraw {
return
}