From 352ec7d821324e47d092b6f86c7ff75f4d8cfc8e Mon Sep 17 00:00:00 2001 From: Alex Lin Date: Mon, 22 Feb 2016 09:52:28 -0600 Subject: [PATCH] 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 --- .../MemoryManager/src/MemoryManager_add_attr_info.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trick_source/sim_services/MemoryManager/src/MemoryManager_add_attr_info.cpp b/trick_source/sim_services/MemoryManager/src/MemoryManager_add_attr_info.cpp index a8fa58ff..56a13bba 100644 --- a/trick_source/sim_services/MemoryManager/src/MemoryManager_add_attr_info.cpp +++ b/trick_source/sim_services/MemoryManager/src/MemoryManager_add_attr_info.cpp @@ -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 ) {