diff --git a/src/engine/mbEnums.java b/src/engine/mbEnums.java index 0358f48a..1a8abec3 100644 --- a/src/engine/mbEnums.java +++ b/src/engine/mbEnums.java @@ -35,11 +35,13 @@ import java.util.concurrent.ThreadLocalRandom; public class mbEnums { public static > long toLong(EnumSet enumSet) { - long r = 0; - for (T value : enumSet) { - r |= 1L << value.ordinal(); - } - return r; + + long bitvector = 0L; + + for (T value : enumSet) + bitvector |= 1L << value.ordinal(); + + return bitvector; } public static > EnumSet fromLong(long bitVector, Class enumClass) {