More static analysis fixes.
This commit is contained in:
@@ -439,7 +439,7 @@ namespace XPC
|
||||
#endif
|
||||
float gearArray[10];
|
||||
|
||||
if ((gear < -8.5f && gear > 9.5f) || (gear < -997.9f && gear > -999.1f))
|
||||
if ((gear < -8.5f && gear > -9.5f) || (gear < -997.9f && gear > -999.1f))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -136,13 +136,11 @@ namespace XPC
|
||||
float py = XPLMGetDataf(planeYref);
|
||||
float pz = XPLMGetDataf(planeZref);
|
||||
|
||||
Waypoint* g;
|
||||
LocalPoint* l;
|
||||
//Convert to local
|
||||
for (size_t i = 0; i < numWaypoints; ++i)
|
||||
{
|
||||
g = &waypoints[i];
|
||||
l = &localPoints[i];
|
||||
Waypoint* g = &waypoints[i];
|
||||
LocalPoint* l = &localPoints[i];
|
||||
XPLMWorldToLocal(g->latitude, g->longitude, g->altitude,
|
||||
&l->x, &l->y, &l->z);
|
||||
}
|
||||
@@ -153,7 +151,7 @@ namespace XPC
|
||||
glBegin(GL_LINES);
|
||||
for (size_t i = 0; i < numWaypoints; ++i)
|
||||
{
|
||||
l = &localPoints[i];
|
||||
LocalPoint* l = &localPoints[i];
|
||||
glVertex3f((float)l->x, (float)l->y, (float)l->z);
|
||||
glVertex3f((float)l->x, -1000.0F, (float)l->z);
|
||||
}
|
||||
@@ -164,7 +162,7 @@ namespace XPC
|
||||
glBegin(GL_LINE_STRIP);
|
||||
for (size_t i = 0; i < numWaypoints; ++i)
|
||||
{
|
||||
l = &localPoints[i];
|
||||
LocalPoint* l = &localPoints[i];
|
||||
glVertex3f((float)l->x, (float)l->y, (float)l->z);
|
||||
}
|
||||
glEnd();
|
||||
@@ -173,7 +171,7 @@ namespace XPC
|
||||
glColor3f(1.0F, 1.0F, 1.0F);
|
||||
for (size_t i = 0; i < numWaypoints; ++i)
|
||||
{
|
||||
l = &localPoints[i];
|
||||
LocalPoint* l = &localPoints[i];
|
||||
float xoff = (float)l->x - px;
|
||||
float yoff = (float)l->y - py;
|
||||
float zoff = (float)l->z - pz;
|
||||
|
||||
@@ -78,13 +78,13 @@ namespace XPC
|
||||
void Log::FormatLine(const char* format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
|
||||
FILE* fd = fopen("XPCLog.txt", "a");
|
||||
if (!fd)
|
||||
{
|
||||
return;
|
||||
}
|
||||
va_start(args, format);
|
||||
|
||||
WriteTime(fd);
|
||||
vfprintf(fd, format, args);
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user