diff options
author | Araq <rumpf_a@web.de> | 2013-12-27 15:48:53 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-12-27 15:48:53 +0100 |
commit | 2df9b442c646e06cc577a723dc2592275bf9b6f5 (patch) | |
tree | e02a95912bc6ad25bdfaea1b9127f8ada96e7314 /lib/system/avltree.nim | |
parent | 9e92455a534956bfbb0a7ec5e6f2bdffd7268818 (diff) | |
download | Nim-2df9b442c646e06cc577a723dc2592275bf9b6f5.tar.gz |
case consistency part 1
Diffstat (limited to 'lib/system/avltree.nim')
-rw-r--r-- | lib/system/avltree.nim | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/system/avltree.nim b/lib/system/avltree.nim index 6a268b453..fc965d6aa 100644 --- a/lib/system/avltree.nim +++ b/lib/system/avltree.nim @@ -9,30 +9,30 @@ # not really an AVL tree anymore, but still balanced ... -template IsBottom(n: PAvlNode): bool = n == bottom +template isBottom(n: PAvlNode): bool = n == bottom proc lowGauge(n: PAvlNode): int = var it = n - while not IsBottom(it): + while not isBottom(it): result = it.key it = it.link[0] proc highGauge(n: PAvlNode): int = result = -1 var it = n - while not IsBottom(it): + while not isBottom(it): result = it.upperBound it = it.link[1] proc find(root: PAvlNode, key: int): PAvlNode = var it = root - while not IsBottom(it): + while not isBottom(it): if it.key == key: return it it = it.link[ord(it.key <% key)] proc inRange(root: PAvlNode, key: int): PAvlNode = var it = root - while not IsBottom(it): + while not isBottom(it): if it.key <=% key and key <% it.upperBound: return it it = it.link[ord(it.key <% key)] |