Skip to content

Commit

Permalink
fix logic to trim white space
Browse files Browse the repository at this point in the history
  • Loading branch information
Vipul-Cariappa authored and vgvassilev committed Oct 16, 2024
1 parent b59c6b1 commit 66d7196
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TypeManip.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ std::string CPyCppyy::TypeManip::compound(const std::string& name)
std::string cleanName = remove_const(name);
auto idx = find_qualifier_index(cleanName);

const std::string& cpd = cleanName.substr(idx, std::string::npos);
std::string cpd = cleanName.substr(idx, std::string::npos);

// for easy identification of fixed size arrays
if (!cpd.empty() && cpd.back() == ']') {
Expand All @@ -171,7 +171,7 @@ std::string CPyCppyy::TypeManip::compound(const std::string& name)

std::ostringstream scpd;
scpd << cpd.substr(0, cpd.find('[')) << "[]";
return scpd.str();
cpd = scpd.str();
}

// XXX: remove this hack
Expand Down

0 comments on commit 66d7196

Please sign in to comment.