Avoid copying SGShared<FGTaxiNode> in ground-net
This makes some common iterations in the AI traffic code faster, since there is no thrashing of the atomic operations.
This commit is contained in:
parent
87f63c4cec
commit
1183d282ae
1 changed files with 2 additions and 2 deletions
|
@ -417,11 +417,11 @@ void FGGroundNetwork::blockSegmentsEndingAt(FGTaxiSegment *seg, int blockId, tim
|
|||
if (!seg)
|
||||
throw sg_exception("Passed invalid segment");
|
||||
|
||||
FGTaxiNode *node = seg->getEnd();
|
||||
const FGTaxiNode *node = seg->endNode;
|
||||
FGTaxiSegmentVector::iterator tsi;
|
||||
for ( tsi = segments.begin(); tsi != segments.end(); tsi++) {
|
||||
FGTaxiSegment* otherSegment = *tsi;
|
||||
if ((otherSegment->getEnd() == node) && (otherSegment != seg)) {
|
||||
if ((otherSegment->endNode == node) && (otherSegment != seg)) {
|
||||
otherSegment->block(blockId, blockTime, now);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue