mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
Fix trivial errorprone warnings (NFC) (#6135)
This commit is contained in:
@@ -48,7 +48,7 @@ public class Mult<A extends Unit<A>, B extends Unit<B>> extends Unit<Mult<A, B>>
|
||||
*/
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public static <A extends Unit<A>, B extends Unit<B>> Mult<A, B> combine(A a, B b) {
|
||||
final long key = ((long) a.hashCode()) << 32L | ((long) b.hashCode()) & 0xFFFFFFFFL;
|
||||
final long key = ((long) a.hashCode()) << 32L | (((long) b.hashCode()) & 0xFFFFFFFFL);
|
||||
if (cache.containsKey(key)) {
|
||||
return cache.get(key);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public class Per<N extends Unit<N>, D extends Unit<D>> extends Unit<Per<N, D>> {
|
||||
public static <N extends Unit<N>, D extends Unit<D>> Per<N, D> combine(
|
||||
N numerator, D denominator) {
|
||||
final long key =
|
||||
((long) numerator.hashCode()) << 32L | ((long) denominator.hashCode()) & 0xFFFFFFFFL;
|
||||
((long) numerator.hashCode()) << 32L | (((long) denominator.hashCode()) & 0xFFFFFFFFL);
|
||||
|
||||
var existing = cache.get(key);
|
||||
if (existing != null) {
|
||||
|
||||
@@ -33,7 +33,7 @@ public class Velocity<D extends Unit<D>> extends Unit<Velocity<D>> {
|
||||
|
||||
/** Generates a cache key used for cache lookups. */
|
||||
private static long cacheKey(Unit<?> numerator, Unit<?> denominator) {
|
||||
return ((long) numerator.hashCode()) << 32L | ((long) denominator.hashCode()) & 0xFFFFFFFFL;
|
||||
return ((long) numerator.hashCode()) << 32L | (((long) denominator.hashCode()) & 0xFFFFFFFFL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user