Trick::MemoryManager::add_attr_info improperly removes the const keyword

Changed the search from "const" to "const " because we're intersted in
removing the const keyword preceding a type name.

refs #184
This commit is contained in:
Alex Lin 2016-02-22 09:52:28 -06:00
parent 912778423b
commit 2c5a46a8bc

View File

@ -58,9 +58,9 @@ int Trick::MemoryManager::add_attr_info( std::string & user_type_string , ATTRIB
std::replace( user_type_name.begin(), user_type_name.end(), '<', '_') ;
std::replace( user_type_name.begin(), user_type_name.end(), ',', '_') ;
std::replace( user_type_name.begin(), user_type_name.end(), '*', ' ') ;
spos = user_type_name.find("const") ;
spos = user_type_name.find("const ") ;
if ( spos != std::string::npos ) {
user_type_name.erase( spos , spos + 5) ;
user_type_name.erase( spos , spos + 6) ;
}
spos = user_type_name.find("[") ;
if ( spos != std::string::npos ) {