Skip to content

Commit 77a533d

Browse files
committed
Drop variables
1 parent 3bc6ec3 commit 77a533d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎cpp2rust/converter/converter.cpp‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3349,8 +3349,8 @@ bool Converter::VisitCXXConstructExpr(clang::CXXConstructExpr *expr) {
33493349
// Take suppress before recursing into the child.
33503350
bool suppress = PushSuppressIteratorClone::take(*this);
33513351
Convert(expr->getArg(0));
3352-
bool clone = ctor->isCopyConstructor() || IsDefaultedMoveConstructor(ctor);
3353-
if (clone && !suppress && !TypeIsCopyable(expr->getType())) {
3352+
if ((ctor->isCopyConstructor() || IsDefaultedMoveConstructor(ctor)) &&
3353+
!suppress && !TypeIsCopyable(expr->getType())) {
33543354
StrCat(".clone()");
33553355
}
33563356
return false;
@@ -3807,11 +3807,11 @@ Converter::GetStructAttributes(const clang::RecordDecl *decl) {
38073807

38083808
std::vector<const char *> struct_attrs;
38093809

3810-
bool derive_clone = HasDefaultedCopyConstructor(decl);
3811-
if (derive_clone && RecordHasCopyableFields(decl)) {
3810+
if (HasDefaultedCopyConstructor(decl) && RecordHasCopyableFields(decl)) {
38123811
struct_attrs.emplace_back("Copy");
38133812
}
3814-
if (derive_clone) {
3813+
3814+
if (HasDefaultedCopyConstructor(decl)) {
38153815
struct_attrs.emplace_back("Clone");
38163816
}
38173817

0 commit comments

Comments
 (0)