Merge pull request #496 from naoliv/pull20

Fix long literals ending with l
This commit is contained in:
vshcherb 2013-08-05 10:39:15 -07:00
commit da648f9545
4 changed files with 10 additions and 10 deletions

View file

@ -16,7 +16,7 @@ public class MapAlgorithms {
}
// calculate middle Y
long mask = 0xffffffffl;
long mask = 0xffffffffL;
long middleY = 0;
for (int i = 0; i < c.size(); i++) {
middleY = middleY + (long)(c.get(i) & mask);
@ -188,7 +188,7 @@ public class MapAlgorithms {
by = outy;
//return (((long) bx) << 32) | ((long) by);
}
return -1l;
return -1L;
}
/**

View file

@ -124,13 +124,13 @@ public class MapUtils {
public static int get31TileNumberX(double longitude){
longitude = checkLongitude(longitude);
long l = 1l << 31;
long l = 1L << 31;
return (int)((longitude + 180d)/360d * l);
}
public static int get31TileNumberY( double latitude){
latitude = checkLatitude(latitude);
double eval = Math.log( Math.tan(toRadians(latitude)) + 1/Math.cos(toRadians(latitude)) );
long l = 1l << 31;
long l = 1L << 31;
if(eval > Math.PI){
eval = Math.PI;
}
@ -270,8 +270,8 @@ public class MapUtils {
}
public static String createShortLocString(double latitude, double longitude, int zoom) {
long lat = (long) (((latitude + 90d)/180d)*(1l << 32));
long lon = (long) (((longitude + 180d)/360d)*(1l << 32));
long lat = (long) (((latitude + 90d)/180d)*(1L << 32));
long lon = (long) (((longitude + 180d)/360d)*(1L << 32));
long code = interleaveBits(lon, lat);
String str = "";
// add eight to the zoom level, which approximates an accuracy of one pixel in a tile.
@ -321,8 +321,8 @@ public class MapUtils {
x <<= (32 - z);
y <<= (32 - z);
// int zoom = z - 8 - ((3 + z_offset) % 3);
double dlat = (180d * (y) / ((double)(1l << 32))) - 90d;
double dlon = (360d * (x)/ ((double)(1l << 32))) - 180d;
double dlat = (180d * (y) / ((double)(1L << 32))) - 90d;
double dlon = (360d * (x)/ ((double)(1L << 32))) - 180d;
return new LatLon(dlat, dlon);
}

View file

@ -121,7 +121,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
public boolean setParkingType(boolean limited) {
if (!limited)
parkingTime.set(-1l);
parkingTime.set(-1L);
parkingType.set(limited);
return true;
}

View file

@ -716,7 +716,7 @@ public class MapRenderRepositories {
if (uncompletedRings.size() > 0) {
unifyIncompletedRings(uncompletedRings, completedRings, leftX, rightX, bottomY, topY, dbId, zoom);
}
long mask = 0xffffffffl;
long mask = 0xffffffffL;
// draw uncompleted for debug purpose
for (int i = 0; i < uncompletedRings.size(); i++) {
TLongList ring = uncompletedRings.get(i);