diff options
author | bptato <nincsnevem662@gmail.com> | 2024-01-17 19:27:42 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-01-17 19:27:42 +0100 |
commit | 58ae65ed182a8a78d67756ec62f30261b9ef6c87 (patch) | |
tree | dd4d18c489cbcbdd0a0848084070e607332df5f2 /src/utils | |
parent | 0bcaa12bb343bfc7b7c1fe70649a378d8647b256 (diff) | |
download | chawan-58ae65ed182a8a78d67756ec62f30261b9ef6c87.tar.gz |
utils/map: remove unused special case
Even if it were used, it's UB...
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/map.nim | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/utils/map.nim b/src/utils/map.nim index e4681c51..4966fcb6 100644 --- a/src/utils/map.nim +++ b/src/utils/map.nim @@ -1,9 +1,6 @@ import std/algorithm func searchInMap*[U, T](a: openArray[(U, T)], u: U): int = - when not (typeof(u) is U): - if c > cast[typeof(c)](high(U)): - return -1 binarySearch(a, u, proc(x: (U, T), y: U): int = cmp(x[0], y)) func isInMap*[U, T](a: openArray[(U, T)], u: U): bool = |