Fix unnecessary bitwise operations
This commit is contained in:
parent
ffaaef6610
commit
a525df7694
5 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue