runelite-client: remove various redundant null checks
This commit is contained in:
@@ -252,10 +252,6 @@ public class SceneOverlay extends Overlay
|
||||
lp = new LocalPoint(
|
||||
lp.getX() + dx * Perspective.LOCAL_TILE_SIZE + dx * Perspective.LOCAL_TILE_SIZE * (area.getWidth() - 1) / 2,
|
||||
lp.getY() + dy * Perspective.LOCAL_TILE_SIZE + dy * Perspective.LOCAL_TILE_SIZE * (area.getHeight() - 1) / 2);
|
||||
if (lp == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Polygon poly = Perspective.getCanvasTilePoly(client, lp);
|
||||
if (poly == null)
|
||||
@@ -313,10 +309,6 @@ public class SceneOverlay extends Overlay
|
||||
private void renderTileIfHasLineOfSight(Graphics2D graphics, WorldArea start, int targetX, int targetY)
|
||||
{
|
||||
WorldPoint targetLocation = new WorldPoint(targetX, targetY, start.getPlane());
|
||||
if (targetLocation == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Running the line of sight algorithm 100 times per frame doesn't
|
||||
// seem to use much CPU time, however rendering 100 tiles does
|
||||
|
||||
@@ -172,11 +172,6 @@ class InstanceMapOverlay extends Overlay
|
||||
drawPlayerDot(graphics, client.getLocalPlayer(), Color.white, Color.black);
|
||||
}
|
||||
|
||||
if (image == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new Dimension(image.getWidth(), image.getHeight());
|
||||
}
|
||||
|
||||
|
||||
@@ -86,11 +86,6 @@ public class KourendLibraryOverlay extends Overlay
|
||||
|
||||
List<Bookcase> allBookcases = library.getBookcasesOnLevel(client.getPlane());
|
||||
|
||||
if (allBookcases == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
for (Bookcase bookcase : allBookcases)
|
||||
{
|
||||
// AABB
|
||||
|
||||
@@ -47,11 +47,6 @@ public class IDAStar extends Pathfinder
|
||||
{
|
||||
PuzzleState goalNode = path(root);
|
||||
|
||||
if (goalNode == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
List<PuzzleState> path = new ArrayList<>();
|
||||
|
||||
PuzzleState parent = goalNode;
|
||||
|
||||
Reference in New Issue
Block a user