Skip to content

Commit 2bd99d0

Browse files
committed
Fixes analyzer issue: Initial value never used
targetCoordinates is assined a value in its declaration. Its first use is another assignment. Moved declaration to first assignment that gets used.
1 parent da2f747 commit 2bd99d0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Core/GuiDisplayGen.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1892,10 +1892,9 @@ - (void) drawStarChart:(GLfloat)x :(GLfloat)y :(GLfloat)z :(GLfloat) alpha :(BOO
18921892
{
18931893
[self drawAdvancedNavArrayAtX:x+hoffset y:y+voffset z:z alpha:alpha usingRoute:nil optimizedBy:OPTIMIZED_BY_NONE zoom: zoom];
18941894
}
1895-
NSPoint targetCoordinates = (NSPoint){0,0};
18961895
if (!routeExists)
18971896
{
1898-
targetCoordinates = [systemManager getCoordinatesForSystem:target inGalaxy:galaxy_id];
1897+
NSPoint targetCoordinates = [systemManager getCoordinatesForSystem:target inGalaxy:galaxy_id];
18991898

19001899
distance = distanceBetweenPlanetPositions(targetCoordinates.x,targetCoordinates.y,galaxy_coordinates.x,galaxy_coordinates.y);
19011900
if (distance == 0.0)

0 commit comments

Comments
 (0)