File tree Expand file tree Collapse file tree
cpp2rust/converter/models Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1299,17 +1299,9 @@ bool ConverterRefCount::VisitExplicitCastExpr(clang::ExplicitCastExpr *expr) {
12991299 } else if (expr->getSubExpr ()->getType ()->isPointerType () &&
13001300 !expr->getSubExpr ()->isNullPointerConstant (
13011301 ctx_, clang::Expr::NPC_ValueDependentIsNull)) {
1302- auto src_pointee = expr->getSubExpr ()->getType ()->getPointeeType ();
1303- auto dst_pointee = expr->getType ()->getPointeeType ();
1304- if (ctx_.hasSameUnqualifiedType (src_pointee, dst_pointee)) {
1305- StrCat (std::format (" ({}.to_strong().as_pointer() as {})" ,
1306- ToString (expr->getSubExpr ()),
1307- ToString (expr->getType ())));
1308- } else {
1309- StrCat (std::format (" {}.reinterpret_cast::<{}>()" ,
1310- ToString (expr->getSubExpr ()),
1311- ConvertPointeeType (expr->getType ())));
1312- }
1302+ StrCat (std::format (" {}.reinterpret_cast::<{}>()" ,
1303+ ToString (expr->getSubExpr ()),
1304+ ConvertPointeeType (expr->getType ())));
13131305 return false ;
13141306 }
13151307 return Converter::VisitExplicitCastExpr (expr);
You can’t perform that action at this time.
0 commit comments