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

vfmt: change all '$expr' to '${expr}' (#16428)

This commit is contained in:
yuyi
2022-11-15 21:53:13 +08:00
committed by GitHub
parent 56239b4a23
commit 017ace6ea7
859 changed files with 7156 additions and 7135 deletions

View File

@@ -98,7 +98,7 @@ pub fn (mut img Image) init_sokol_image() &Image {
pub fn (ctx &Context) draw_image(x f32, y f32, width f32, height f32, img_ &Image) {
$if macos {
if img_.id >= ctx.image_cache.len {
eprintln('gg: draw_image() bad img id $img_.id (img cache len = $ctx.image_cache.len)')
eprintln('gg: draw_image() bad img id ${img_.id} (img cache len = ${ctx.image_cache.len})')
return
}
if ctx.native_rendering {
@@ -203,7 +203,7 @@ pub fn (mut ctx Context) create_image_with_size(file string, width int, height i
// TODO remove this
fn create_image(file string) Image {
if !os.exists(file) {
println('gg.create_image(): file not found: $file')
println('gg.create_image(): file not found: ${file}')
return Image{} // none
}
stb_img := stbi.load(file) or { return Image{} }
@@ -262,7 +262,7 @@ pub struct StreamingImageConfig {
pub fn (ctx &Context) draw_image_with_config(config DrawImageConfig) {
id := if !isnil(config.img) { config.img.id } else { config.img_id }
if id >= ctx.image_cache.len {
eprintln('gg: draw_image() bad img id $id (img cache len = $ctx.image_cache.len)')
eprintln('gg: draw_image() bad img id ${id} (img cache len = ${ctx.image_cache.len})')
return
}