Bugfix use of type checks in FGPositioned::findAllWithIdentSortedByRange
This commit is contained in:
parent
9ebd19babf
commit
c08cc9693e
1 changed files with 9 additions and 2 deletions
|
@ -568,10 +568,17 @@ FGPositioned::findAllWithIdentSortedByRange(const std::string& aIdent, const SGG
|
|||
List result;
|
||||
NamedIndexRange range = global_namedIndex.equal_range(aIdent);
|
||||
for (; range.first != range.second; ++range.first) {
|
||||
if (aFilter && !aFilter->pass(range.first->second)) {
|
||||
FGPositioned* candidate = range.first->second;
|
||||
if (aFilter) {
|
||||
if (aFilter->hasTypeRange() && !aFilter->passType(candidate->type())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!aFilter->pass(candidate)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
result.push_back(range.first->second);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue