From ce23ba6a9eef9cd6875fba7093399297bd666396 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 17 May 2024 23:08:00 +0200 Subject: clean parameter name in map_delete --- public/common/util.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'public') 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) -- cgit v1.2.3