SGVec3d cartOrigin(SGVec3d::fromGeod(aOrigin));
for (; it != range.second; ++it) {
- FGPositioned::Type ty = range.first->second->type();
+ FGPositioned* r = it->second;
if (aFilter) {
- if (aFilter->hasTypeRange() && !aFilter->passType(ty)) {
+ if (aFilter->hasTypeRange() && !aFilter->passType(r->type())) {
continue;
}
- if (!aFilter->pass(range.first->second)) {
+ if (!aFilter->pass(r)) {
continue;
}
}
// find distance
- double d2 = distSqr(cartOrigin, it->second->cart());
+ double d2 = distSqr(cartOrigin, r->cart());
if (d2 < minDist) {
minDist = d2;
- result = it->second;
+ result = r;
}
}
SGReferenced::get(this); // hold an owning ref, for the moment
if (aIndexed) {
- assert(ty != TAXIWAY);
+ assert(ty != TAXIWAY && ty != PAVEMENT);
addToIndices(this);
}
}
switch (aTy) {
case RUNWAY: return "runway";
case TAXIWAY: return "taxiway";
+ case PAVEMENT: return "pavement";
case PARK_STAND: return "parking stand";
case FIX: return "fix";
case VOR: return "VOR";