[genapts] Eliminate variable shadowing.
Default initialization overrides.
This commit is contained in:
parent
9a5eac3c59
commit
488b69c63f
5 changed files with 38 additions and 47 deletions
|
@ -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");
|
||||
|
||||
|
|
|
@ -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)) )
|
||||
|
|
|
@ -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 ) )
|
||||
|
|
|
@ -62,13 +62,12 @@ void Parser::set_debug( const std::string& path, std::vector<std::string> runway
|
|||
shapes.push_back( std::numeric_limits<int>::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<std::string> runway
|
|||
shapes.push_back( std::numeric_limits<int>::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<std::string> runway
|
|||
shapes.push_back( std::numeric_limits<int>::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<std::string> runway
|
|||
shapes.push_back( std::numeric_limits<int>::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();
|
||||
|
|
|
@ -73,13 +73,12 @@ void Scheduler::set_debug( const std::string& path, std::vector<std::string> run
|
|||
shapes.push_back( std::numeric_limits<int>::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<std::string> run
|
|||
shapes.push_back( std::numeric_limits<int>::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<std::string> run
|
|||
shapes.push_back( std::numeric_limits<int>::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<std::string> run
|
|||
shapes.push_back( std::numeric_limits<int>::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();
|
||||
|
|
Loading…
Add table
Reference in a new issue