Skip to content

Commit 9fbc090

Browse files
committed
Cleanup
1 parent 872e57b commit 9fbc090

File tree

1 file changed

+6
-5
lines changed
  • src/main/kotlin/com/github/lipen/bdd

1 file changed

+6
-5
lines changed

src/main/kotlin/com/github/lipen/bdd/BDD.kt

+6-5
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ class BDD(
2020
private val storage = Storage(1 shl storageBits)
2121
private val buckets = IntArray(1 shl bucketsBits)
2222

23-
val one = Ref(1) // terminal 1
24-
val zero = Ref(-1) // terminal 0
25-
2623
init {
27-
check(storage.alloc() == 1) // allocate the terminal node
28-
buckets[0] = 1 // store the terminal node in the 0th bucket
24+
val terminal = storage.alloc() // allocate the terminal node
25+
check(terminal == 1)
26+
buckets[0] = terminal // store the terminal node in the 0th bucket
2927
}
3028

29+
val one = Ref(1) // terminal 1
30+
val zero = Ref(-1) // terminal 0
31+
3132
val size: Int get() = storage.lastIndex
3233
val realSize: Int get() = storage.realSize
3334

0 commit comments

Comments
 (0)