Modified Files:
src/Navaids/awynet.cxx src/Navaids/awynet.hxx: Olaf Flebbe: Implement ~FGAirwayNetwork, though it is not called now Guard snprint properly.
This commit is contained in:
parent
b81a7c8180
commit
96872a73cb
2 changed files with 9 additions and 1 deletions
|
@ -141,6 +141,12 @@ FGAirwayNetwork::FGAirwayNetwork()
|
||||||
maxDistance = 0;
|
maxDistance = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FGAirwayNetwork::~FGAirwayNetwork()
|
||||||
|
{
|
||||||
|
for (unsigned int it = 0; it < nodes.size(); it++) {
|
||||||
|
delete nodes[ it];
|
||||||
|
}
|
||||||
|
}
|
||||||
void FGAirwayNetwork::addAirway(const FGAirway &seg)
|
void FGAirwayNetwork::addAirway(const FGAirway &seg)
|
||||||
{
|
{
|
||||||
segments.push_back(seg);
|
segments.push_back(seg);
|
||||||
|
@ -262,7 +268,8 @@ void FGAirwayNetwork::load(SGPath path)
|
||||||
char buffer[32];
|
char buffer[32];
|
||||||
string startNode, endNode;
|
string startNode, endNode;
|
||||||
// Start
|
// Start
|
||||||
snprintf(buffer, 32, "%s%d%d", identStart.c_str(), (int) latStart, (int) lonStart);
|
buffer[sizeof(buffer)-1] = 0;
|
||||||
|
snprintf(buffer, sizeof(buffer)-1, "%s%d%d", identStart.c_str(), (int) latStart, (int) lonStart);
|
||||||
startNode = buffer;
|
startNode = buffer;
|
||||||
|
|
||||||
node_map_iterator itr = nodesMap.find(string(buffer));
|
node_map_iterator itr = nodesMap.find(string(buffer));
|
||||||
|
|
|
@ -192,6 +192,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FGAirwayNetwork();
|
FGAirwayNetwork();
|
||||||
|
~FGAirwayNetwork();
|
||||||
|
|
||||||
//void addNode (const FGNode& node);
|
//void addNode (const FGNode& node);
|
||||||
//void addNodes (FGParkingVec *parkings);
|
//void addNodes (FGParkingVec *parkings);
|
||||||
|
|
Loading…
Reference in a new issue