From ae1cb5697ef873df9107220df797a50c497c5165 Mon Sep 17 00:00:00 2001 From: yuyi Date: Thu, 31 Mar 2022 02:06:38 +0800 Subject: [PATCH] cgen: minor cleanup in ref_or_deref_arg() (#13874) --- vlib/v/gen/c/fn.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/v/gen/c/fn.v b/vlib/v/gen/c/fn.v index 15ddbc5b97..72d6cde6b4 100644 --- a/vlib/v/gen/c/fn.v +++ b/vlib/v/gen/c/fn.v @@ -1748,8 +1748,8 @@ fn (mut g Gen) ref_or_deref_arg(arg ast.CallArg, expected_type ast.Type, lang as expected_type } deref_sym := g.table.sym(expected_deref_type) - if !((arg_typ_sym.kind == .function) - || deref_sym.kind in [.sum_type, .interface_]) && lang != .c { + if arg_typ_sym.kind != .function && deref_sym.kind !in [.sum_type, .interface_] + && lang != .c { if arg.expr.is_lvalue() { g.write('(voidptr)&/*qq*/') } else {