1
0
Fork 0

src/MultiPlayer/multiplaymgr.cxx: use SGPropertyNode_ptr to avoid explicit delete.

As suggested by James Turner
This commit is contained in:
Julian Smith 2020-03-15 15:05:20 +00:00
parent 2dcf9c30bb
commit 904e55d657

View file

@ -2381,7 +2381,7 @@ FGMultiplayMgr::addMultiplayer(const std::string& callsign,
*/
mp->_getProps()->removeChildren("set");
SGPropertyNode* set = NULL;
SGPropertyNode_ptr set;
if (simgear::strutils::ends_with(modelName, ".xml")
&& simgear::strutils::starts_with(modelName, "Aircraft/")) {
@ -2444,8 +2444,7 @@ FGMultiplayMgr::addMultiplayer(const std::string& callsign,
break;
}
}
delete set;
set = NULL;
set.reset();
}
}
}