Skip to content

Commit

Permalink
Remove unnecessary type casts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gary Gregory committed Jul 20, 2019
1 parent 3e6fb93 commit fe39ffc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public static long hash64(final byte[] data, final int length, final int seed) {
case 2:
h ^= (long) (data[(length & ~7) + 1] & 0xff) << 8;
case 1:
h ^= (long) (data[length & ~7] & 0xff);
h ^= data[length & ~7] & 0xff;
h *= m;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ public static long[] hash128(final byte[] data, final int offset, final int leng
case 10:
k2 ^= (long) (data[offset + tailStart + 9] & 0xff) << 8;
case 9:
k2 ^= (long) (data[offset + tailStart + 8] & 0xff);
k2 ^= data[offset + tailStart + 8] & 0xff;
k2 *= C2;
k2 = Long.rotateLeft(k2, R3);
k2 *= C1;
Expand All @@ -482,7 +482,7 @@ public static long[] hash128(final byte[] data, final int offset, final int leng
case 2:
k1 ^= (long) (data[offset + tailStart + 1] & 0xff) << 8;
case 1:
k1 ^= (long) (data[offset + tailStart] & 0xff);
k1 ^= data[offset + tailStart] & 0xff;
k1 *= C1;
k1 = Long.rotateLeft(k1, R1);
k1 *= C2;
Expand Down

0 comments on commit fe39ffc

Please sign in to comment.