summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-05-17 23:08:00 +0200
committerTor Andersson <tor@ccxvii.net>2024-05-17 23:08:14 +0200
commitce23ba6a9eef9cd6875fba7093399297bd666396 (patch)
tree57e23ca6a5f143f9fa279d0fec01cd719e55553d /public
parent19fc6cc1e0f2f4479b71ff6fed9cb5d21da7961d (diff)
downloadserver-ce23ba6a9eef9cd6875fba7093399297bd666396.tar.gz
clean parameter name in map_delete
Diffstat (limited to 'public')
-rw-r--r--public/common/util.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/public/common/util.js b/public/common/util.js
index 0979178..c14d406 100644
--- a/public/common/util.js
+++ b/public/common/util.js
@@ -262,15 +262,15 @@ function map_set(map, key, value) {
array_insert_pair(map, a<<1, key, value)
}
-function map_delete(map, item) {
+function map_delete(map, key) {
let a = 0
let b = (map.length >> 1) - 1
while (a <= b) {
let m = (a + b) >> 1
let x = map[m<<1]
- if (item < x)
+ if (key < x)
b = m - 1
- else if (item > x)
+ else if (key > x)
a = m + 1
else {
array_remove_pair(map, m<<1)