]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIManager.cxx
Make saveInitialProperties smarter, and hence simplify the reset code path.
[flightgear.git] / src / AIModel / AIManager.cxx
index ed4f4a5345e5bb53563b12132e2e100316c484b0..315920ab5ce15cb58a8b3a565fcb438d4562cc82 100644 (file)
@@ -18,6 +18,8 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
+#include <cstring>
+
 #include <simgear/math/sg_geodesy.hxx>
 #include <simgear/props/props_io.hxx>
 #include <simgear/structure/exception.hxx>
@@ -381,7 +383,7 @@ FGAIManager::getStartPosition(const string& id, const string& pid,
                         std::string pnumber = scEntry->getStringValue("pennant-number");
                         std::string name = scEntry->getStringValue("name");
                         if (type == "carrier" && (pnumber == id || name == id)) {
-                            osg::ref_ptr<FGAICarrier> carrier = new FGAICarrier;
+                            SGSharedPtr<FGAICarrier> carrier = new FGAICarrier;
                             carrier->readFromScenario(scEntry);
 
                             if (carrier->getParkPosition(pid, geodPos, hdng, uvw)) {