Skip to content

Commit a07a40f

Browse files
committed
Delete unused function
1 parent 8fa8bec commit a07a40f

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

‎cpp2rust/converter/models/converter_refcount.cpp‎

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -545,28 +545,9 @@ void ConverterRefCount::AddDropTrait(const clang::CXXRecordDecl *decl) {
545545
StrCat('}');
546546
}
547547

548-
static bool recordImplementsByteRepr(const clang::RecordDecl *decl) {
549-
if (decl->isUnion()) {
550-
return false;
551-
}
552-
553-
// ByteRepr is only supported for user-defined structs that contain ByteRepr
554-
// fields.
555-
for (auto *f : decl->fields()) {
556-
auto qt = f->getType();
557-
if (!qt->isIntegerType() && !qt->isFloatingType() &&
558-
!qt->isEnumeralType()) {
559-
return false;
560-
}
561-
}
562-
563-
return true;
564-
}
565-
566548
void ConverterRefCount::AddByteReprTrait(const clang::RecordDecl *decl) {
567549
auto struct_name = GetRecordName(decl);
568550

569-
570551
if (!TypeImplementsByteRepr(ctx_.getCanonicalTagType(decl))) {
571552
StrCat(std::format("impl ByteRepr for {}", struct_name));
572553
PushBrace brace(*this);

0 commit comments

Comments
 (0)