Optimize if statements in the client module (#8998)
This commit is contained in:
committed by
Tomas Slusny
parent
7e0017fe4d
commit
43c04992bc
@@ -66,10 +66,6 @@ class CacheKey
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (this.type != other.type)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return this.type == other.type;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1314,10 +1314,7 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
||||
{
|
||||
int var21 = (pitchCos * modelHeight >> 16) + var19;
|
||||
int var22 = (var18 - var21) * zoom;
|
||||
if (var22 / var14 < Rasterizer3D_clipMidY2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return var22 / var14 < Rasterizer3D_clipMidY2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,12 +123,7 @@ public class KeyRemappingPlugin extends Plugin
|
||||
// the search box on the world map can be focused, and chat input goes there, even
|
||||
// though the chatbox still has its key listener.
|
||||
Widget worldMapSearch = client.getWidget(WidgetInfo.WORLD_MAP_SEARCH);
|
||||
if (worldMapSearch != null && client.getVar(VarClientInt.WORLD_MAP_SEARCH_FOCUSED) == 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return worldMapSearch == null || client.getVar(VarClientInt.WORLD_MAP_SEARCH_FOCUSED) != 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -215,11 +215,6 @@ public class PuzzleState
|
||||
return true;
|
||||
}
|
||||
|
||||
if (y1 == y2 && absX == 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return y1 == y2 && absX == 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user