mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: fix all remaining unsafe 0 (#14856)
This commit is contained in:
parent
cb60392302
commit
5a79a54fe4
@ -2,7 +2,7 @@ import term.ui as tui
|
|||||||
|
|
||||||
struct App {
|
struct App {
|
||||||
mut:
|
mut:
|
||||||
tui &tui.Context = 0
|
tui &tui.Context = unsafe { 0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
fn event(e &tui.Event, x voidptr) {
|
fn event(e &tui.Event, x voidptr) {
|
||||||
|
@ -242,7 +242,7 @@ fn (mut b Ball) update(dt f32) {
|
|||||||
[heap]
|
[heap]
|
||||||
struct Game {
|
struct Game {
|
||||||
mut:
|
mut:
|
||||||
app &App = 0
|
app &App = unsafe { 0 }
|
||||||
players []Player
|
players []Player
|
||||||
ball Ball
|
ball Ball
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ mut:
|
|||||||
|
|
||||||
struct App {
|
struct App {
|
||||||
mut:
|
mut:
|
||||||
tui &tui.Context = 0
|
tui &tui.Context = unsafe { 0 }
|
||||||
rects []Rect
|
rects []Rect
|
||||||
cur_rect Rect
|
cur_rect Rect
|
||||||
is_drag bool
|
is_drag bool
|
||||||
|
@ -90,7 +90,7 @@ const (
|
|||||||
|
|
||||||
struct App {
|
struct App {
|
||||||
mut:
|
mut:
|
||||||
ui &ui.Context = 0
|
ui &ui.Context = unsafe { 0 }
|
||||||
header_text []string
|
header_text []string
|
||||||
mouse_pos Point
|
mouse_pos Point
|
||||||
msg string
|
msg string
|
||||||
|
@ -57,8 +57,8 @@ pub:
|
|||||||
|
|
||||||
struct App {
|
struct App {
|
||||||
mut:
|
mut:
|
||||||
tui &tui.Context = 0
|
tui &tui.Context = unsafe { 0 }
|
||||||
ed &Buffer = 0
|
ed &Buffer = unsafe { 0 }
|
||||||
current_file int
|
current_file int
|
||||||
files []string
|
files []string
|
||||||
status string
|
status string
|
||||||
|
@ -259,7 +259,7 @@ fn (mut r Rat) randomize() {
|
|||||||
[heap]
|
[heap]
|
||||||
struct App {
|
struct App {
|
||||||
mut:
|
mut:
|
||||||
termui &termui.Context = 0
|
termui &termui.Context = unsafe { 0 }
|
||||||
snake Snake
|
snake Snake
|
||||||
rat Rat
|
rat Rat
|
||||||
width int
|
width int
|
||||||
|
@ -16,7 +16,7 @@ pub mut:
|
|||||||
children []&Tag
|
children []&Tag
|
||||||
attributes map[string]string // attributes will be like map[name]value
|
attributes map[string]string // attributes will be like map[name]value
|
||||||
last_attribute string
|
last_attribute string
|
||||||
parent &Tag = 0
|
parent &Tag = unsafe { 0 }
|
||||||
position_in_parent int
|
position_in_parent int
|
||||||
closed bool
|
closed bool
|
||||||
close_type CloseTagType = .in_name
|
close_type CloseTagType = .in_name
|
||||||
|
@ -6,7 +6,7 @@ pub:
|
|||||||
date &u8 = unsafe { 0 }
|
date &u8 = unsafe { 0 }
|
||||||
buf_start &u8 = unsafe { 0 }
|
buf_start &u8 = unsafe { 0 }
|
||||||
pub mut:
|
pub mut:
|
||||||
buf &u8 = 0
|
buf &u8 = unsafe { 0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
[inline]
|
[inline]
|
||||||
|
@ -19,7 +19,7 @@ import math
|
|||||||
pub struct BitMap {
|
pub struct BitMap {
|
||||||
pub mut:
|
pub mut:
|
||||||
tf &TTF_File
|
tf &TTF_File
|
||||||
buf &u8 = 0 // pointer to the memory buffer
|
buf &u8 = unsafe { 0 } // pointer to the memory buffer
|
||||||
buf_size int // allocated buf size in bytes
|
buf_size int // allocated buf size in bytes
|
||||||
width int = 1 // width of the buffer
|
width int = 1 // width of the buffer
|
||||||
height int = 1 // height of the buffer
|
height int = 1 // height of the buffer
|
||||||
|
Loading…
Reference in New Issue
Block a user