never add an untested "harmless" one-liner before committing ...
This commit is contained in:
parent
6a8197968a
commit
70de6eac24
1 changed files with 4 additions and 4 deletions
|
@ -237,7 +237,9 @@ string FGRunwayList::search( const string& aptid, const int hdg ) {
|
|||
double max = 0.0;
|
||||
bool reversed = false;
|
||||
|
||||
while (r._id == aptid) {
|
||||
do {
|
||||
if (r._id != aptid)
|
||||
break;
|
||||
if (r._type != "runway")
|
||||
continue;
|
||||
|
||||
|
@ -283,9 +285,7 @@ string FGRunwayList::search( const string& aptid, const int hdg ) {
|
|||
reversed = true;
|
||||
}
|
||||
|
||||
if (!next(&r))
|
||||
break;
|
||||
}
|
||||
} while (!next(&r));
|
||||
|
||||
return reversed ? GetReverseRunwayNo(best._rwy_no) : best._rwy_no;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue