X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FEnvironment%2Fmetarproperties.cxx;h=aa67b355a7b8fa9bfadcfb6a08c8f6ff0322e8ba;hb=89b41395d861a49ad543af166c0bd41c14dd0d2b;hp=171d716afc3ebd868e99b61ffc9eb354a625604d;hpb=13ba9209e98427fcb6f08796906cd699a89877e5;p=flightgear.git diff --git a/src/Environment/metarproperties.cxx b/src/Environment/metarproperties.cxx index 171d716af..aa67b355a 100644 --- a/src/Environment/metarproperties.cxx +++ b/src/Environment/metarproperties.cxx @@ -83,7 +83,7 @@ inline void MagneticVariation::recalc( double lon, double lat, double alt ) // calculation of magnetic variation is expensive. Cache the position // and perform this calculation only if it has changed if( _lon != lon || _lat != lat || _alt != alt ) { - SG_LOG(SG_ALL, SG_DEBUG, "Recalculating magvar for lon=" << lon << ", lat=" << lat << ", alt=" << alt ); + SG_LOG(SG_ENVIRONMENT, SG_DEBUG, "Recalculating magvar for lon=" << lon << ", lat=" << lat << ", alt=" << alt ); _lon = lon; _lat = lat; _alt = alt; @@ -137,7 +137,7 @@ MetarProperties::MetarProperties( SGPropertyNode_ptr rootNode ) : _magneticVariation(new MagneticVariation()) { // Hack to avoid static initialization order problems on OSX - if( coverage_string.size() == 0 ) { + if( coverage_string.empty() ) { coverage_string.push_back(SGCloudLayer::SG_CLOUD_CLEAR_STRING); coverage_string.push_back(SGCloudLayer::SG_CLOUD_FEW_STRING); coverage_string.push_back(SGCloudLayer::SG_CLOUD_SCATTERED_STRING); @@ -194,14 +194,14 @@ void MetarProperties::set_metar( const char * metar ) m = new FGMetar( _metar ); } catch( sg_io_exception ) { - SG_LOG( SG_GENERAL, SG_WARN, "Can't parse metar: " << _metar ); + SG_LOG( SG_ENVIRONMENT, SG_WARN, "Can't parse metar: " << _metar ); _metarValidNode->setBoolValue(false); return; } _decoded.clear(); const vector weather = m->getWeather(); - for( vector::const_iterator it = weather.begin(); it != weather.end(); it++ ) { + for( vector::const_iterator it = weather.begin(); it != weather.end(); ++it ) { if( false == _decoded.empty() ) _decoded.append(", "); _decoded.append(*it); } @@ -301,9 +301,6 @@ void MetarProperties::set_metar( const char * metar ) } } - vector cv = m->getClouds(); - vector::const_iterator cloud, cloud_end = cv.end(); - { static const char * LAYER = "layer"; SGPropertyNode_ptr cloudsNode = _rootNode->getNode("clouds", true );