Skip to content

Commit b86b57e

Browse files
committed
Add support for non-instantiated template rules
1 parent d33dad4 commit b86b57e

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") {
@@ -669,7 +668,7 @@ void AddRuleForUserDefinedType(clang::NamedDecl *decl) {
669668
break;
670669
case Model::kRefCount:
671670
types_[cpp_name + " *"] = TranslationRule::TypeTgt::RefcountPtr(
672-
"PtrDyn<dyn " + rs_name + ">");
671+
"PtrDyn<dyn " + rs_name + '>');
673672
break;
674673
}
675674
} else {
@@ -680,7 +679,7 @@ void AddRuleForUserDefinedType(clang::NamedDecl *decl) {
680679
break;
681680
case Model::kRefCount:
682681
types_[cpp_name + " *"] =
683-
TranslationRule::TypeTgt::RefcountPtr("Ptr<" + rs_name + ">");
682+
TranslationRule::TypeTgt::RefcountPtr("Ptr<" + rs_name + '>');
684683
break;
685684
}
686685
}

0 commit comments

Comments
 (0)