1
0
Fork 0

Dead code removal

This commit is contained in:
Scott Giese 2020-08-29 11:00:55 -05:00
parent 5a29e7aade
commit 532d879f72

View file

@ -746,31 +746,33 @@ void FGSubmodelMgr::setOffsetPos(submodel* sm)
void FGSubmodelMgr::valueChanged(SGPropertyNode *prop) void FGSubmodelMgr::valueChanged(SGPropertyNode *prop)
{ {
return; // this isn't working atm // REVIEW: This code has been dead for 10 years
const char* _model_added = _model_added_node->getStringValue(); // return; // this isn't working atm
std::basic_string <char>::size_type indexCh2b; // const char* _model_added = _model_added_node->getStringValue();
string str2 = _model_added; // std::basic_string <char>::size_type indexCh2b;
const char *cstr2b = "multiplayer";
indexCh2b = str2.find(cstr2b, 0);
// Ignoring Ballistic Objects; there are potentially too many // string str2 = _model_added;
if (indexCh2b != string::npos ) { // const char *cstr2b = "multiplayer";
//cout << "Submodels: model added - " << str2 <<" read path "<< endl; // indexCh2b = str2.find(cstr2b, 0);
//return;
SGPropertyNode *a_node = fgGetNode(_model_added, true);
SGPropertyNode *sub_node = a_node->getChild("sim", 0, true);
SGPropertyNode_ptr path_node = sub_node->getChild("path", 0, true);
SGPropertyNode_ptr callsign_node = a_node->getChild("callsign", 0, true);
//const string& callsign = callsign_node->getStringValue(); // // Ignoring Ballistic Objects; there are potentially too many
//cout << "Submodels: model added - " << callsign <<" read callsign "<< endl; // if (indexCh2b != string::npos ) {
} // //cout << "Submodels: model added - " << str2 <<" read path "<< endl;
else { // //return;
cout << "model added - " << str2 <<" returning " << endl; // SGPropertyNode *a_node = fgGetNode(_model_added, true);
} // SGPropertyNode *sub_node = a_node->getChild("sim", 0, true);
// SGPropertyNode_ptr path_node = sub_node->getChild("path", 0, true);
// SGPropertyNode_ptr callsign_node = a_node->getChild("callsign", 0, true);
// //const string& callsign = callsign_node->getStringValue();
// //cout << "Submodels: model added - " << callsign <<" read callsign "<< endl;
// }
// else {
// cout << "model added - " << str2 <<" returning " << endl;
// }
} }
void FGSubmodelMgr::setParentNode(int id) void FGSubmodelMgr::setParentNode(int id)