Small refactoring for previous commit.
This commit is contained in:
parent
895cf3b173
commit
e2efcc4170
@ -273,13 +273,12 @@ public class GeoEngine
|
|||||||
final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
|
final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
|
||||||
|
|
||||||
// if x or y is out of array return null
|
// if x or y is out of array return null
|
||||||
if ((x >= GeoStructure.GEO_BLOCKS_X) || (y >= GeoStructure.GEO_BLOCKS_Y))
|
if ((x < GeoStructure.GEO_BLOCKS_X) && (y < GeoStructure.GEO_BLOCKS_Y))
|
||||||
{
|
{
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return _blocks[x][y];
|
return _blocks[x][y];
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if geo coordinates has geo.
|
* Check if geo coordinates has geo.
|
||||||
|
@ -273,13 +273,12 @@ public class GeoEngine
|
|||||||
final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
|
final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
|
||||||
|
|
||||||
// if x or y is out of array return null
|
// if x or y is out of array return null
|
||||||
if ((x >= GeoStructure.GEO_BLOCKS_X) || (y >= GeoStructure.GEO_BLOCKS_Y))
|
if ((x < GeoStructure.GEO_BLOCKS_X) && (y < GeoStructure.GEO_BLOCKS_Y))
|
||||||
{
|
{
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return _blocks[x][y];
|
return _blocks[x][y];
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if geo coordinates has geo.
|
* Check if geo coordinates has geo.
|
||||||
|
@ -273,13 +273,12 @@ public class GeoEngine
|
|||||||
final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
|
final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
|
||||||
|
|
||||||
// if x or y is out of array return null
|
// if x or y is out of array return null
|
||||||
if ((x >= GeoStructure.GEO_BLOCKS_X) || (y >= GeoStructure.GEO_BLOCKS_Y))
|
if ((x < GeoStructure.GEO_BLOCKS_X) && (y < GeoStructure.GEO_BLOCKS_Y))
|
||||||
{
|
{
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return _blocks[x][y];
|
return _blocks[x][y];
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if geo coordinates has geo.
|
* Check if geo coordinates has geo.
|
||||||
|
@ -271,13 +271,12 @@ public class GeoEngine
|
|||||||
final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
|
final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
|
||||||
|
|
||||||
// if x or y is out of array return null
|
// if x or y is out of array return null
|
||||||
if ((x >= GeoStructure.GEO_BLOCKS_X) || (y >= GeoStructure.GEO_BLOCKS_Y))
|
if ((x < GeoStructure.GEO_BLOCKS_X) && (y < GeoStructure.GEO_BLOCKS_Y))
|
||||||
{
|
{
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return _blocks[x][y];
|
return _blocks[x][y];
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if geo coordinates has geo.
|
* Check if geo coordinates has geo.
|
||||||
|
@ -273,13 +273,12 @@ public class GeoEngine
|
|||||||
final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
|
final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
|
||||||
|
|
||||||
// if x or y is out of array return null
|
// if x or y is out of array return null
|
||||||
if ((x >= GeoStructure.GEO_BLOCKS_X) || (y >= GeoStructure.GEO_BLOCKS_Y))
|
if ((x < GeoStructure.GEO_BLOCKS_X) && (y < GeoStructure.GEO_BLOCKS_Y))
|
||||||
{
|
{
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return _blocks[x][y];
|
return _blocks[x][y];
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if geo coordinates has geo.
|
* Check if geo coordinates has geo.
|
||||||
|
Loading…
Reference in New Issue
Block a user