From 2f149e69845cb53f94bb5dbfe43309f0b6a7846a Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 18 Oct 2020 13:45:13 +0300 Subject: [PATCH] vfmt: fix merged param warnings in sokol's particles example and vlib/x/net/udp.v --- examples/sokol/particles/modules/particle/particle.v | 2 +- examples/sokol/particles/modules/particle/system.v | 2 +- vlib/sokol/sgl/sgl_funcs.v | 8 ++++---- vlib/x/net/udp.v | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/sokol/particles/modules/particle/particle.v b/examples/sokol/particles/modules/particle/particle.v index 03489e89b3..461da39582 100644 --- a/examples/sokol/particles/modules/particle/particle.v +++ b/examples/sokol/particles/modules/particle/particle.v @@ -23,7 +23,7 @@ pub fn new(location vec2.Vec2) &Particle { return p } -fn remap(v, min, max, new_min, new_max f64) f64 { +fn remap(v f64, min f64, max f64, new_min f64, new_max f64) f64 { return (((v - min) * (new_max - new_min)) / (max - min)) + new_min } diff --git a/examples/sokol/particles/modules/particle/system.v b/examples/sokol/particles/modules/particle/system.v index b77b768f16..ef96813bf0 100644 --- a/examples/sokol/particles/modules/particle/system.v +++ b/examples/sokol/particles/modules/particle/system.v @@ -58,7 +58,7 @@ pub fn (mut s System) reset() { } } -pub fn (mut s System) explode(x, y f32) { +pub fn (mut s System) explode(x f32, y f32) { mut reserve := 500 center := vec2.Vec2{x, y} mut p := &Particle(0) diff --git a/vlib/sokol/sgl/sgl_funcs.v b/vlib/sokol/sgl/sgl_funcs.v index 143aa2e795..88618a11fd 100644 --- a/vlib/sokol/sgl/sgl_funcs.v +++ b/vlib/sokol/sgl/sgl_funcs.v @@ -30,10 +30,10 @@ fn C.sgl_matrix_mode_modelview() fn C.sgl_matrix_mode_projection() fn C.sgl_matrix_mode_texture() fn C.sgl_load_identity() -fn C.sgl_load_matrix(m []f32) // should be [16]f32 -fn C.sgl_load_transpose_matrix(m []f32) // should be [16]f32 -fn C.sgl_mult_matrix(m []f32) -fn C.sgl_mult_transpose_matrix(m []f32) // should be [16]f32 +fn C.sgl_load_matrix(m [16]f32) +fn C.sgl_load_transpose_matrix(m [16]f32) +fn C.sgl_mult_matrix(m [16]f32) +fn C.sgl_mult_transpose_matrix(m [16]f32) fn C.sgl_rotate(angle_rad f32, x f32, y f32, z f32) fn C.sgl_scale(x f32, y f32, z f32) fn C.sgl_translate(x f32, y f32, z f32) diff --git a/vlib/x/net/udp.v b/vlib/x/net/udp.v index af5e1549de..68a00b77a2 100644 --- a/vlib/x/net/udp.v +++ b/vlib/x/net/udp.v @@ -13,7 +13,7 @@ mut: write_timeout time.Duration } -pub fn dial_udp(laddr, raddr string) ?UdpConn { +pub fn dial_udp(laddr string, raddr string) ?UdpConn { // Dont have to do this when its fixed // this just allows us to store this `none` optional in a struct resolve_wrapper := fn(raddr string) ?Addr {