Skip to content

Commit 5a60ab6

Browse files
Copilotnunoplopes
andauthored
Fix typo 'Dettach' -> 'Detach'; restore explicit .str() for consistency
Agent-Logs-Url: https://github.com/Cpp2Rust/cpp2rust/sessions/67031e6a-ec2f-4f6c-a534-ac63f300898d Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com>
1 parent ecd28d2 commit 5a60ab6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cpp2rust/converter/mapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ std::string mapTypeStringRecursive(const std::string &cpp_type) {
549549
std::string normalizeTranslationRule(std::string rule) {
550550
static const std::array<std::pair<std::regex, std::string>, 2>
551551
normalization_rules{{
552-
// Dettach pointer from double reference. Useful for matching
552+
// Detach pointer from double reference. Useful for matching
553553
// translation rules.
554554
{std::regex(R"(\*\&\&)"), "* &&"},
555555
// Ignore constant template parameters, i.e. replace them with _.
@@ -568,7 +568,7 @@ static std::string synthesizeAnonRecordName(const clang::RecordDecl *record) {
568568
if (auto *parent =
569569
clang::dyn_cast<clang::RecordDecl>(record->getDeclContext())) {
570570
parent_name = parent->getIdentifier()
571-
? std::string(parent->getIdentifier()->getName())
571+
? parent->getIdentifier()->getName().str()
572572
: synthesizeAnonRecordName(parent);
573573
parent_name += '_';
574574
}

0 commit comments

Comments
 (0)