diff --git a/src/Airports/GenAirports850/closedpoly.cxx b/src/Airports/GenAirports850/closedpoly.cxx index bb538ff6..bc129fd0 100644 --- a/src/Airports/GenAirports850/closedpoly.cxx +++ b/src/Airports/GenAirports850/closedpoly.cxx @@ -126,9 +126,9 @@ void ClosedPoly::ConvertContour( const BezContour& src, tgContour& dst ) SGGeod cp1; SGGeod cp2; - int curve_type = CURVE_LINEAR; + int curve_type; double total_dist; - int num_segs = BEZIER_DETAIL; + int num_segs; TG_LOG(SG_GENERAL, SG_DEBUG, "Creating a contour with " << src.size() << " nodes"); diff --git a/src/Airports/GenAirports850/linearfeature.cxx b/src/Airports/GenAirports850/linearfeature.cxx index 622eec97..63b734af 100644 --- a/src/Airports/GenAirports850/linearfeature.cxx +++ b/src/Airports/GenAirports850/linearfeature.cxx @@ -14,10 +14,10 @@ void LinearFeature::ConvertContour( const BezContour& src, bool closed ) SGGeod cp1; SGGeod cp2; - int curve_type = CURVE_LINEAR; + int curve_type; double total_dist; double theta1, theta2; - int num_segs = BEZIER_DETAIL; + int num_segs; Marking* cur_mark = NULL; Lighting* cur_light = NULL; @@ -161,7 +161,7 @@ void LinearFeature::ConvertContour( const BezContour& src, bool closed ) // Sometimes, the control point lies just beyond the final point. We try to make a 'hook' at the end, which makes some really bad polys // Just convert the entire segment to linear // this can be detected in quadratic curves (current issue in LFKJ) when the contol point lies within the line generated from point 1 to point 2 - // theat close to 180 at the control point to the cur node and next node + // at close to 180 at the control point to the cur node and next node if ( curve_type == CURVE_QUADRATIC ) { if ( (std::abs(theta1 - 180.0) < 5.0 ) || (std::abs(theta1) < 5.0 ) || (std::isnan(theta1)) ) diff --git a/src/Airports/GenAirports850/main.cxx b/src/Airports/GenAirports850/main.cxx index 62b0ca39..a3c69295 100644 --- a/src/Airports/GenAirports850/main.cxx +++ b/src/Airports/GenAirports850/main.cxx @@ -129,7 +129,6 @@ int main(int argc, char **argv) SGGeod min = SGGeod::fromDeg( -180, -90 ); SGGeod max = SGGeod::fromDeg( 180, 90 ); - long position = 0; // Setup elevation directories string_list elev_src; @@ -344,7 +343,7 @@ int main(int argc, char **argv) TG_LOG(SG_GENERAL, SG_INFO, "move forward to " << start_id ); // scroll forward in datafile - position = scheduler->FindAirport( start_id ); + long position = scheduler->FindAirport( start_id ); // add remaining airports within boundary if ( scheduler->AddAirports( position, &boundingBox ) ) diff --git a/src/Airports/GenAirports850/parser.cxx b/src/Airports/GenAirports850/parser.cxx index 8a9a4de5..841d7706 100644 --- a/src/Airports/GenAirports850/parser.cxx +++ b/src/Airports/GenAirports850/parser.cxx @@ -62,13 +62,12 @@ void Parser::set_debug( const std::string& path, std::vector runway shapes.push_back( std::numeric_limits::max() ); } else { std::stringstream ss(dsd); - int i; - - while (ss >> i) + int idx; + while (ss >> idx) { - TG_LOG(SG_GENERAL, SG_ALERT, "Adding debug runway " << i); + TG_LOG(SG_GENERAL, SG_ALERT, "Adding debug runway " << idx); - shapes.push_back(i); + shapes.push_back(idx); if (ss.peek() == ',') ss.ignore(); @@ -91,13 +90,12 @@ void Parser::set_debug( const std::string& path, std::vector runway shapes.push_back( std::numeric_limits::max() ); } else { std::stringstream ss(dsd); - int i; - - while (ss >> i) + int idx; + while (ss >> idx) { - TG_LOG(SG_GENERAL, SG_ALERT, "Adding debug pavement " << i); + TG_LOG(SG_GENERAL, SG_ALERT, "Adding debug pavement " << idx); - shapes.push_back(i); + shapes.push_back(idx); if (ss.peek() == ',') ss.ignore(); @@ -120,13 +118,12 @@ void Parser::set_debug( const std::string& path, std::vector runway shapes.push_back( std::numeric_limits::max() ); } else { std::stringstream ss(dsd); - int i; - - while (ss >> i) + int idx; + while (ss >> idx) { - TG_LOG(SG_GENERAL, SG_ALERT, "Adding debug taxiway " << i); + TG_LOG(SG_GENERAL, SG_ALERT, "Adding debug taxiway " << idx); - shapes.push_back(i); + shapes.push_back(idx); if (ss.peek() == ',') ss.ignore(); @@ -149,13 +146,12 @@ void Parser::set_debug( const std::string& path, std::vector runway shapes.push_back( std::numeric_limits::max() ); } else { std::stringstream ss(dsd); - int i; - - while (ss >> i) + int idx; + while (ss >> idx) { - TG_LOG(SG_GENERAL, SG_ALERT, "Adding debug feature " << i); + TG_LOG(SG_GENERAL, SG_ALERT, "Adding debug feature " << idx); - shapes.push_back(i); + shapes.push_back(idx); if (ss.peek() == ',') ss.ignore(); diff --git a/src/Airports/GenAirports850/scheduler.cxx b/src/Airports/GenAirports850/scheduler.cxx index 8e54b520..a844151e 100644 --- a/src/Airports/GenAirports850/scheduler.cxx +++ b/src/Airports/GenAirports850/scheduler.cxx @@ -73,13 +73,12 @@ void Scheduler::set_debug( const std::string& path, std::vector run shapes.push_back( std::numeric_limits::max() ); } else { std::stringstream ss(dsd); - int i; - - while (ss >> i) + int idx; + while (ss >> idx) { - TG_LOG(SG_GENERAL, SG_ALERT, "Adding debug runway " << i << " for " << icao ); + TG_LOG(SG_GENERAL, SG_ALERT, "Adding debug runway " << idx << " for " << icao ); - shapes.push_back(i); + shapes.push_back(idx); if (ss.peek() == ',') ss.ignore(); @@ -102,13 +101,12 @@ void Scheduler::set_debug( const std::string& path, std::vector run shapes.push_back( std::numeric_limits::max() ); } else { std::stringstream ss(dsd); - int i; - - while (ss >> i) + int idx; + while (ss >> idx) { - TG_LOG(SG_GENERAL, SG_ALERT, "Adding debug pavement " << i << " for " << icao ); + TG_LOG(SG_GENERAL, SG_ALERT, "Adding debug pavement " << idx << " for " << icao ); - shapes.push_back(i); + shapes.push_back(idx); if (ss.peek() == ',') ss.ignore(); @@ -131,13 +129,12 @@ void Scheduler::set_debug( const std::string& path, std::vector run shapes.push_back( std::numeric_limits::max() ); } else { std::stringstream ss(dsd); - int i; - - while (ss >> i) + int idx; + while (ss >> idx) { - TG_LOG(SG_GENERAL, SG_ALERT, "Adding debug taxiway " << i << " for " << icao ); + TG_LOG(SG_GENERAL, SG_ALERT, "Adding debug taxiway " << idx << " for " << icao ); - shapes.push_back(i); + shapes.push_back(idx); if (ss.peek() == ',') ss.ignore(); @@ -160,13 +157,12 @@ void Scheduler::set_debug( const std::string& path, std::vector run shapes.push_back( std::numeric_limits::max() ); } else { std::stringstream ss(dsd); - int i; - - while (ss >> i) + int idx; + while (ss >> idx) { - TG_LOG(SG_GENERAL, SG_ALERT, "Adding debug feature " << i << " for " << icao ); + TG_LOG(SG_GENERAL, SG_ALERT, "Adding debug feature " << idx << " for " << icao ); - shapes.push_back(i); + shapes.push_back(idx); if (ss.peek() == ',') ss.ignore();