fix: Compilation Error
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
package org.jackhuang.hmcl.game;
|
||||
|
||||
import org.jackhuang.hmcl.util.Lang;
|
||||
import org.jackhuang.hmcl.util.platform.Architecture;
|
||||
import org.jackhuang.hmcl.util.platform.OperatingSystem;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
@@ -71,7 +72,7 @@ public final class OSRestriction {
|
||||
return false;
|
||||
|
||||
if (arch != null)
|
||||
return !Lang.test(() -> !Pattern.compile(arch).matcher(OperatingSystem.SYSTEM_ARCHITECTURE).matches());
|
||||
return !Lang.test(() -> !Pattern.compile(arch).matcher(Architecture.SYSTEM_ARCHITECTURE).matches());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,15 +44,10 @@ public enum Platform {
|
||||
return bit;
|
||||
}
|
||||
|
||||
/**
|
||||
* True if current Java Environment is 64-bit.
|
||||
*/
|
||||
public static final boolean IS_64_BIT = OperatingSystem.SYSTEM_ARCHITECTURE.contains("64");
|
||||
|
||||
/**
|
||||
* The platform of current Java Environment.
|
||||
*/
|
||||
public static final Platform PLATFORM = IS_64_BIT ? BIT_64 : BIT_32;
|
||||
public static final Platform PLATFORM = Architecture.CURRENT.getPlatform();
|
||||
|
||||
/**
|
||||
* The json serializer to {@link Platform}.
|
||||
|
||||
Reference in New Issue
Block a user