Fixed some warnings
This commit is contained in:
parent
5afe36149f
commit
ac1e224d26
4 changed files with 12 additions and 12 deletions
|
|
@ -6,7 +6,7 @@ package ei.engine.math;
|
||||||
* @author Ziver
|
* @author Ziver
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class Vector2f implements Comparable{
|
public class Vector2f implements Comparable<Vector2f>{
|
||||||
private float x;
|
private float x;
|
||||||
private float y;
|
private float y;
|
||||||
|
|
||||||
|
|
@ -79,10 +79,10 @@ public class Vector2f implements Comparable{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public int compareTo(Object v) {
|
public int compareTo(Vector2f v) {
|
||||||
if(x+y > ((Vector2f) v).getX()+((Vector2f) v).getY())
|
if(x+y > v.getX()+v.getY())
|
||||||
return 1;
|
return 1;
|
||||||
else if(x+y < ((Vector2f) v).getX()+((Vector2f) v).getY())
|
else if(x+y < v.getX()+v.getY())
|
||||||
return -1;
|
return -1;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ package ei.engine.math;
|
||||||
* @author Ziver
|
* @author Ziver
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class Vector2i implements Comparable{
|
public class Vector2i implements Comparable<Vector2i>{
|
||||||
private int x;
|
private int x;
|
||||||
private int y;
|
private int y;
|
||||||
|
|
||||||
|
|
@ -76,10 +76,10 @@ public class Vector2i implements Comparable{
|
||||||
return "Vector2i["+x+","+y+"]";
|
return "Vector2i["+x+","+y+"]";
|
||||||
}
|
}
|
||||||
|
|
||||||
public int compareTo(Object v) {
|
public int compareTo(Vector2i v) {
|
||||||
if(x+y > ((Vector2i) v).getX()+((Vector2i) v).getY())
|
if(x+y > v.getX()+v.getY())
|
||||||
return 1;
|
return 1;
|
||||||
else if(x+y < ((Vector2i) v).getX()+((Vector2i) v).getY())
|
else if(x+y < v.getX()+v.getY())
|
||||||
return -1;
|
return -1;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ public class TextureLoader {
|
||||||
* @throws IOException Indicates a failure to access the resource
|
* @throws IOException Indicates a failure to access the resource
|
||||||
*/
|
*/
|
||||||
public Texture getTexture(String resourceName){
|
public Texture getTexture(String resourceName){
|
||||||
Texture tex = (Texture) table.get(resourceName);
|
Texture tex = table.get(resourceName);
|
||||||
|
|
||||||
if (tex != null) {
|
if (tex != null) {
|
||||||
return tex;
|
return tex;
|
||||||
|
|
|
||||||
|
|
@ -263,7 +263,7 @@ public strictfp class AStarPathFinder implements PathFinder {
|
||||||
*
|
*
|
||||||
* @author Kevin Glass
|
* @author Kevin Glass
|
||||||
*/
|
*/
|
||||||
private class Step implements Comparable {
|
private class Step implements Comparable<Step> {
|
||||||
/** The x position of this step */
|
/** The x position of this step */
|
||||||
public int x;
|
public int x;
|
||||||
/** The y position of this step */
|
/** The y position of this step */
|
||||||
|
|
@ -315,8 +315,8 @@ public strictfp class AStarPathFinder implements PathFinder {
|
||||||
/**
|
/**
|
||||||
* @see java.lang.Comparable#compareTo(java.lang.Object)
|
* @see java.lang.Comparable#compareTo(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public int compareTo(Object o) {
|
public int compareTo(Step o) {
|
||||||
return h - ((Step) o).h;
|
return h - o.h;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue