1
0
Fork 0

ATISEncoder: remove always true condition

This commit is contained in:
Scott Giese 2021-12-26 20:09:20 -06:00
parent 17fde93fb2
commit 3e096fed41

View file

@ -431,9 +431,9 @@ string ATISEncoder::getTransitionLevel( SGPropertyNode_ptr )
int tl; int tl;
if (hPa <= 978) { if (hPa <= 978) {
tl = 80; tl = 80;
} else if( hPa > 978 && hPa <= 1013 ) { } else if (hPa <= 1013) {
tl = 70; tl = 70;
} else if( hPa > 1013 && hPa <= 1046 ) { } else if (hPa <= 1046) {
tl = 60; tl = 60;
} else { } else {
tl = 50; tl = 50;
@ -525,10 +525,12 @@ string ATISEncoder::getClouds( SGPropertyNode_ptr )
ATISInformationProvider::CloudEntries cloudEntries = _atis->getClouds(); ATISInformationProvider::CloudEntries cloudEntries = _atis->getClouds();
for( ATISInformationProvider::CloudEntries::iterator it = cloudEntries.begin(); it != cloudEntries.end(); it++ ) { for (ATISInformationProvider::CloudEntries::iterator it = cloudEntries.begin(); it != cloudEntries.end(); ++it) {
if( !reply.empty() ) reply.SPACE; if (!reply.empty())
reply.SPACE;
reply.append( it->second ).SPACE.append( getSpokenAltitude(it->first).SPACE.append( FEET ) ); reply.append( it->second ).SPACE.append( getSpokenAltitude(it->first).SPACE.append( FEET ) );
} }
return reply; return reply;
} }
@ -538,10 +540,12 @@ string ATISEncoder::getCloudsBrief( SGPropertyNode_ptr )
ATISInformationProvider::CloudEntries cloudEntries = _atis->getClouds(); ATISInformationProvider::CloudEntries cloudEntries = _atis->getClouds();
for( ATISInformationProvider::CloudEntries::iterator it = cloudEntries.begin(); it != cloudEntries.end(); it++ ) { for (ATISInformationProvider::CloudEntries::iterator it = cloudEntries.begin(); it != cloudEntries.end(); ++it) {
if( !reply.empty() ) reply.append(",").SPACE; if (!reply.empty())
reply.append(",").SPACE;
reply.append( it->second ).SPACE.append( getSpokenAltitude(it->first) ); reply.append( it->second ).SPACE.append( getSpokenAltitude(it->first) );
} }
return reply; return reply;
} }