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

checker: ban unsafe pointer/fn comparison (#14462)

This commit is contained in:
Vincenzo Palazzo
2022-05-20 17:30:16 +02:00
committed by GitHub
parent d81fbb1ccd
commit 17bba712bd
28 changed files with 111 additions and 68 deletions

View File

@ -95,7 +95,7 @@ pub fn (mut s System) explode(x f32, y f32) {
pub fn (mut s System) free() {
for p in s.pool {
if p == 0 {
if unsafe { p == 0 } {
print(ptr_str(p) + ' ouch')
continue
}
@ -103,7 +103,7 @@ pub fn (mut s System) free() {
}
s.pool.clear()
for p in s.bin {
if p == 0 {
if unsafe { p == 0 } {
print(ptr_str(p) + ' ouch')
continue
}