all: fix all remaining unsafe 0 (#14856)

This commit is contained in:
yuyi 2022-06-26 22:04:23 +08:00 committed by GitHub
parent cb60392302
commit 5a79a54fe4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 10 additions and 10 deletions

View file

@ -2,7 +2,7 @@ import term.ui as tui
struct App {
mut:
tui &tui.Context = 0
tui &tui.Context = unsafe { 0 }
}
fn event(e &tui.Event, x voidptr) {

View file

@ -242,7 +242,7 @@ fn (mut b Ball) update(dt f32) {
[heap]
struct Game {
mut:
app &App = 0
app &App = unsafe { 0 }
players []Player
ball Ball
}

View file

@ -12,7 +12,7 @@ mut:
struct App {
mut:
tui &tui.Context = 0
tui &tui.Context = unsafe { 0 }
rects []Rect
cur_rect Rect
is_drag bool

View file

@ -90,7 +90,7 @@ const (
struct App {
mut:
ui &ui.Context = 0
ui &ui.Context = unsafe { 0 }
header_text []string
mouse_pos Point
msg string

View file

@ -57,8 +57,8 @@ pub:
struct App {
mut:
tui &tui.Context = 0
ed &Buffer = 0
tui &tui.Context = unsafe { 0 }
ed &Buffer = unsafe { 0 }
current_file int
files []string
status string

View file

@ -259,7 +259,7 @@ fn (mut r Rat) randomize() {
[heap]
struct App {
mut:
termui &termui.Context = 0
termui &termui.Context = unsafe { 0 }
snake Snake
rat Rat
width int