Open-source multiplayer game server compatible with the RuneScape client
https://www.openrs2.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
462 B
17 lines
462 B
package org.openrs2.deob.bytecode.analysis
|
|
|
|
public enum class IntBranchResult {
|
|
ALWAYS_TAKEN, NEVER_TAKEN, UNKNOWN;
|
|
|
|
public companion object {
|
|
public fun fromTakenNotTaken(taken: Int, notTaken: Int): IntBranchResult {
|
|
require(taken != 0 || notTaken != 0)
|
|
|
|
return when {
|
|
taken == 0 -> NEVER_TAKEN
|
|
notTaken == 0 -> ALWAYS_TAKEN
|
|
else -> UNKNOWN
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|