mirror of
https://github.com/gkd-kit/gkd.git
synced 2024-11-16 03:32:38 +08:00
This commit is contained in:
parent
2ae5698624
commit
4fc031a3fe
|
@ -58,7 +58,7 @@ data class NodeInfo(
|
||||||
stack.add(TempNodeData(root, null, 0, 0))
|
stack.add(TempNodeData(root, null, 0, 0))
|
||||||
while (stack.isNotEmpty()) {
|
while (stack.isNotEmpty()) {
|
||||||
times++
|
times++
|
||||||
val node = stack.removeLast()
|
val node = stack.removeAt(stack.lastIndex)
|
||||||
node.id = times - 1
|
node.id = times - 1
|
||||||
val children = getChildren(node.node).mapIndexed { i, child ->
|
val children = getChildren(node.node).mapIndexed { i, child ->
|
||||||
TempNodeData(
|
TempNodeData(
|
||||||
|
@ -131,7 +131,7 @@ data class NodeInfo(
|
||||||
} else {
|
} else {
|
||||||
val tempStack = mutableListOf(n)
|
val tempStack = mutableListOf(n)
|
||||||
while (tempStack.isNotEmpty()) {
|
while (tempStack.isNotEmpty()) {
|
||||||
val top = tempStack.removeLast()
|
val top = tempStack.removeAt(tempStack.lastIndex)
|
||||||
top.idQf = n.idQf
|
top.idQf = n.idQf
|
||||||
if (idTextQf) {
|
if (idTextQf) {
|
||||||
top.textQf = n.textQf
|
top.textQf = n.textQf
|
||||||
|
@ -168,7 +168,7 @@ data class NodeInfo(
|
||||||
} else {
|
} else {
|
||||||
val tempStack = mutableListOf(n)
|
val tempStack = mutableListOf(n)
|
||||||
while (tempStack.isNotEmpty()) {
|
while (tempStack.isNotEmpty()) {
|
||||||
val top = tempStack.removeLast()
|
val top = tempStack.removeAt(tempStack.lastIndex)
|
||||||
top.textQf = n.textQf
|
top.textQf = n.textQf
|
||||||
if (idTextQf) {
|
if (idTextQf) {
|
||||||
top.idQf = n.idQf
|
top.idQf = n.idQf
|
||||||
|
|
Loading…
Reference in New Issue
Block a user