Skip to content

Commit ea3d07c

Browse files
committed
simplify
1 parent a5f6b22 commit ea3d07c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎cpp2rust/converter/models/converter_refcount.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,16 +1263,16 @@ bool ConverterRefCount::VisitImplicitCastExpr(clang::ImplicitCastExpr *expr) {
12631263
}
12641264

12651265
if (expr->getCastKind() == clang::CastKind::CK_NoOp) {
1266+
Convert(sub_expr);
1267+
12661268
if (expr->getType()->isPointerType() && sub_expr->getType()->isPointerType()) {
12671269
auto dest_type = ConvertPointeeType(expr->getType());
12681270
if (dest_type != ConvertPointeeType(sub_expr->getType())) {
1269-
Convert(sub_expr);
12701271
StrCat(std::format(".reinterpret_cast::<{}>()", dest_type));
12711272
computed_expr_type_ = ComputedExprType::FreshPointer;
12721273
return false;
12731274
}
12741275
}
1275-
Convert(sub_expr);
12761276
return false;
12771277
}
12781278

0 commit comments

Comments
 (0)