Skip to content
Snippets Groups Projects
Commit b14aed57 authored by Gareth Tribello's avatar Gareth Tribello
Browse files

A fix to registration of component names.

I remembered why I was using find rather than ==.  It should now work
for the problematic cases though
parent 3a5190f7
No related branches found
No related tags found
No related merge requests found
...@@ -571,8 +571,13 @@ void Keywords::addOutputComponent( const std::string& name, const std::string& k ...@@ -571,8 +571,13 @@ void Keywords::addOutputComponent( const std::string& name, const std::string& k
bool Keywords::outputComponentExists( const std::string& name, const bool& custom ) const { bool Keywords::outputComponentExists( const std::string& name, const bool& custom ) const {
if( custom && cstring.find("customizable")!=std::string::npos ) return true; if( custom && cstring.find("customizable")!=std::string::npos ) return true;
std::string sname; std::size_t num=name.find_first_of("0123456789");
if( num!=std::string::npos ) sname=name.substr(0,num-1);
else sname=name;
for(unsigned i=0;i<cnames.size();++i){ for(unsigned i=0;i<cnames.size();++i){
if( name==cnames[i] ) return true; if( sname==cnames[i] ) return true;
} }
return false; return false;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment