diff --git a/OsmAnd-java/src/net/osmand/GeoidAltitudeCorrection.java b/OsmAnd-java/src/net/osmand/GeoidAltitudeCorrection.java index 87ec33a3ec..9a090ba768 100644 --- a/OsmAnd-java/src/net/osmand/GeoidAltitudeCorrection.java +++ b/OsmAnd-java/src/net/osmand/GeoidAltitudeCorrection.java @@ -72,6 +72,6 @@ public class GeoidAltitudeCorrection { rf.read(b); int ch1 = b[0] < 0 ? b[0] + 256 : b[0]; int ch2 = b[1] < 0 ? b[1] + 256 : b[1]; - return (short)((ch1 << 8) + (ch2 << 0)); + return (short)((ch1 << 8) + ch2); } } diff --git a/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java b/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java index 7a4140e5c5..d73b4a44e7 100644 --- a/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java +++ b/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java @@ -190,7 +190,7 @@ public class BinaryInspector { ous.writeRawByte((v >>> 24) & 0xFF); ous.writeRawByte((v >>> 16) & 0xFF); ous.writeRawByte((v >>> 8) & 0xFF); - ous.writeRawByte((v >>> 0) & 0xFF); + ous.writeRawByte(v & 0xFF); //written += 4; } diff --git a/OsmAnd-java/src/net/osmand/binary/BinaryMapIndexReader.java b/OsmAnd-java/src/net/osmand/binary/BinaryMapIndexReader.java index 57c34fbc9f..8ae1fb2565 100644 --- a/OsmAnd-java/src/net/osmand/binary/BinaryMapIndexReader.java +++ b/OsmAnd-java/src/net/osmand/binary/BinaryMapIndexReader.java @@ -339,7 +339,7 @@ public class BinaryMapIndexReader { int ch2 = readByte(); int ch3 = readByte(); int ch4 = readByte(); - return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0)); + return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + ch4); } diff --git a/OsmAnd-java/src/net/osmand/osm/io/Base64.java b/OsmAnd-java/src/net/osmand/osm/io/Base64.java index 49854f313d..0a3da9bee2 100644 --- a/OsmAnd-java/src/net/osmand/osm/io/Base64.java +++ b/OsmAnd-java/src/net/osmand/osm/io/Base64.java @@ -47,7 +47,7 @@ public class Base64 { // store the octets bits24 = (octetString[i++] & 0xFF) << 16; bits24 |= (octetString[i++] & 0xFF) << 8; - bits24 |= (octetString[i++] & 0xFF) << 0; + bits24 |= (octetString[i++] & 0xFF); bits6 = (bits24 & 0x00FC0000) >> 18; out[outIndex++] = alphabet[bits6]; diff --git a/OsmAnd-java/src/net/osmand/util/Algorithms.java b/OsmAnd-java/src/net/osmand/util/Algorithms.java index f8a4f84260..faae29c8fb 100644 --- a/OsmAnd-java/src/net/osmand/util/Algorithms.java +++ b/OsmAnd-java/src/net/osmand/util/Algorithms.java @@ -54,7 +54,7 @@ public class Algorithms { int ch4 = in.read(); if ((ch1 | ch2 | ch3 | ch4) < 0) throw new EOFException(); - return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0)); + return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + ch4); } public static String capitalizeFirstLetterAndLowercase(String s) {