Skip to content

Commit

Permalink
cgen: cleanup, use expected_is_ptr instead of calling .is_ptr() aga…
Browse files Browse the repository at this point in the history
…in (#19836)
  • Loading branch information
ttytm committed Nov 13, 2023
1 parent 999328a commit bcc2bfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/v/gen/c/cgen.v
Expand Up @@ -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)
Expand Down

0 comments on commit bcc2bfa

Please sign in to comment.