mirror of
https://github.com/nasa/trick.git
synced 2025-06-21 08:29:39 +00:00
Fix io code for classes with excluded parents
Check the return value of CXXRecordVisitor::TraverseCXXRecordDecl and don't add information from excluded parents. Add a parameter to PrintAttributes::isHeaderExcluded to toggle exlusion of TRICK_EXT_LIB_DIRS paths. When traversing a CXX record, we don't actually want to skip these paths since their io code should exist in the Trickified library. Fix memory leak. Refs #435
This commit is contained in:
@ -155,10 +155,11 @@ void HeaderSearchDirs::AddDirsAndFiles(std::string env_var, std::vector<std::str
|
||||
std::ifstream file_or_dir(resolved_path) ;
|
||||
file_or_dir.seekg(0, std::ios::end) ;
|
||||
if ( !file_or_dir.good()) {
|
||||
var_list.push_back(std::string(resolved_path) + std::string("/"));
|
||||
var_list.push_back(std::string(resolved_path) + "/");
|
||||
} else {
|
||||
var_list.push_back(std::string(resolved_path));
|
||||
}
|
||||
free(resolved_path);
|
||||
} else {
|
||||
std::cout << bold(color(WARNING, "Warning")) << " Cannot find " <<
|
||||
env_var << " path " << quote(bold(item)) << std::endl ;
|
||||
|
Reference in New Issue
Block a user