X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Fgps.cxx;h=aff76facf897f1441b919fa1e6ee8224f00ffa60;hb=61812ef4b88f5aa74e9cc0630c84d6fc6b4a51cd;hp=b466948c42d3a1bc08ff96283de84c1154f2b25f;hpb=15139a42b6a064e66bff74958893dd748769d68c;p=flightgear.git diff --git a/src/Instrumentation/gps.cxx b/src/Instrumentation/gps.cxx index b466948c4..aff76facf 100644 --- a/src/Instrumentation/gps.cxx +++ b/src/Instrumentation/gps.cxx @@ -24,7 +24,7 @@ #include "gps.hxx" -SG_USING_STD(string); +using std::string; GPS::GPS ( SGPropertyNode *node) @@ -43,17 +43,20 @@ GPS::GPS ( SGPropertyNode *node) _distance_m(0), _course_deg(0), _name(node->getStringValue("name", "gps")), - _num(node->getIntValue("number", 0)) + _num(node->getIntValue("number", 0)), + route(0) { } GPS::~GPS () { + delete route; } void GPS::init () { + delete route; // in case init is called twice route = new SGRoute; route->clear();