feat(Kotlin): Replace value with _val (#1254)

* ci(kotlin): Add workflow file.

* Update kotlin.yml

* style(kotlin): value -> _val

---------

Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
curtishd
2024-04-10 18:09:43 +08:00
committed by GitHub
parent 39e2e1a5c1
commit 1623e3c6a8
28 changed files with 152 additions and 152 deletions
@@ -66,10 +66,10 @@ class LinkedListDeque {
fun pop(isFront: Boolean): Int {
if (isEmpty())
throw IndexOutOfBoundsException()
val value: Int
val _val: Int
// 队首出队操作
if (isFront) {
value = front!!._val // 暂存头节点值
_val = front!!._val // 暂存头节点值
// 删除头节点
val fNext = front!!.next
if (fNext != null) {
@@ -79,7 +79,7 @@ class LinkedListDeque {
front = fNext // 更新头节点
// 队尾出队操作
} else {
value = rear!!._val // 暂存尾节点值
_val = rear!!._val // 暂存尾节点值
// 删除尾节点
val rPrev = rear!!.prev
if (rPrev != null) {
@@ -89,7 +89,7 @@ class LinkedListDeque {
rear = rPrev // 更新尾节点
}
queSize-- // 更新队列长度
return value
return _val
}
/* 队首出队 */