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

tools: make v test-cleancode test everything by default (#10050)

This commit is contained in:
Delyan Angelov
2021-05-08 13:32:29 +03:00
committed by GitHub
parent cba2cb6b9c
commit 8a380f4699
132 changed files with 3230 additions and 3440 deletions

View File

@@ -62,7 +62,7 @@ fn (mut bmp BitMap) format_texture() {
b_a := byte(bmp.bg_color & 0xFF)
// trasform buffer in a texture
x := byteptr(bmp.buf)
x := bmp.buf
unsafe {
mut i := 0
for i < bmp.buf_size {

View File

@@ -20,8 +20,8 @@ import math.mathutil as mu
pub struct BitMap {
pub mut:
tf &TTF_File
buf byteptr // pointer to the memory buffer
buf_size int // allocated buf size in bytes
buf &byte = 0 // pointer to the memory buffer
buf_size int // allocated buf size in bytes
width int = 1 // width of the buffer
height int = 1 // height of the buffer
bp int = 4 // byte per pixel of the buffer

View File

@@ -540,7 +540,7 @@ fn (mut tf TTF_File) get_fixed() f32 {
fn (mut tf TTF_File) get_string(length int) string {
tmp_pos := u64(tf.pos)
tf.pos += u32(length)
return unsafe { tos(byteptr(u64(tf.buf.data) + tmp_pos), length) }
return unsafe { tos(&byte(u64(tf.buf.data) + tmp_pos), length) }
}
fn (mut tf TTF_File) get_unicode_string(length int) string {