From bcc2bfad153a02df11965b54cee588a78e42e735 Mon Sep 17 00:00:00 2001 From: Turiiya <34311583+ttytm@users.noreply.github.com> Date: Mon, 13 Nov 2023 12:02:31 +0100 Subject: [PATCH] cgen: cleanup, use `expected_is_ptr` instead of calling .is_ptr() again (#19836) --- vlib/v/gen/c/cgen.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/gen/c/cgen.v b/vlib/v/gen/c/cgen.v index 3771bcb0e5..bb504bfbf4 100644 --- a/vlib/v/gen/c/cgen.v +++ b/vlib/v/gen/c/cgen.v @@ -2537,7 +2537,7 @@ fn (mut g Gen) expr_with_cast(expr ast.Expr, got_type_raw ast.Type, expected_typ g.writeln('}, sizeof(${shared_styp}))') return } else if got_type_raw.has_flag(.shared_f) && !expected_type.has_flag(.shared_f) { - if expected_type.is_ptr() { + if expected_is_ptr { g.write('&') } g.expr(expr)