Browse Source

Menu item Implement Method: no longer adds unnecessary namespaces to parameters.

merge-requests/365/head
eidheim 8 years ago
parent
commit
134ab188ad
  1. 6
      src/source_clang.cc

6
src/source_clang.cc

@ -1398,9 +1398,9 @@ Source::ClangViewRefactor::ClangViewRefactor(const boost::filesystem::path &file
for(auto &argument_cursor: cursor.get_arguments()) { for(auto &argument_cursor: cursor.get_arguments()) {
auto argument_type=argument_cursor.get_type().get_spelling(); auto argument_type=argument_cursor.get_type().get_spelling();
for(auto it=semantic_parents.rbegin();it!=semantic_parents.rend();++it) { for(auto it=semantic_parents.rbegin();it!=semantic_parents.rend();++it) {
size_t pos=argument_type.find(' '+*it); size_t pos=argument_type.find(*it);
if(pos!=std::string::npos) if(pos==0)
argument_type.erase(pos+1, it->size()); argument_type.erase(pos, it->size());
} }
auto argument=argument_cursor.get_spelling(); auto argument=argument_cursor.get_spelling();
if(!arguments.empty()) if(!arguments.empty())

Loading…
Cancel
Save