Skip to content

Commit a6caff8

Browse files
committed
Add support for non-instantiated template rules
1 parent ff93441 commit a6caff8

22 files changed

Lines changed: 972 additions & 890 deletions

File tree

cpp2rust/converter/mapper.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,6 @@ decltype(types_)::const_iterator search(clang::QualType qual_type) {
391391
}
392392

393393
void addRulesFromDirectory(const std::filesystem::path &dir, Model model) {
394-
std::vector<std::filesystem::path> paths;
395394
for (const auto &entry : std::filesystem::recursive_directory_iterator(dir)) {
396395
auto &path = entry.path();
397396
if (entry.is_regular_file() && path.extension() == ".cpp") {
@@ -670,7 +669,7 @@ void AddRuleForUserDefinedType(clang::NamedDecl *decl) {
670669
break;
671670
case Model::kRefCount:
672671
types_[cpp_name + " *"] = TranslationRule::TypeTgt::RefcountPtr(
673-
"PtrDyn<dyn " + rs_name + ">");
672+
"PtrDyn<dyn " + rs_name + '>');
674673
break;
675674
}
676675
} else {
@@ -681,7 +680,7 @@ void AddRuleForUserDefinedType(clang::NamedDecl *decl) {
681680
break;
682681
case Model::kRefCount:
683682
types_[cpp_name + " *"] =
684-
TranslationRule::TypeTgt::RefcountPtr("Ptr<" + rs_name + ">");
683+
TranslationRule::TypeTgt::RefcountPtr("Ptr<" + rs_name + '>');
685684
break;
686685
}
687686
}

0 commit comments

Comments
 (0)