diff options
author | Kaushal Modi <kaushal.modi@gmail.com> | 2019-07-16 15:24:09 -0400 |
---|---|---|
committer | Miran <narimiran@disroot.org> | 2019-07-16 21:24:09 +0200 |
commit | 44d80dd86373b9ba41051428948eae30ed97acd3 (patch) | |
tree | 107158176be1547561654dcb97b3e4f797107fe1 /lib | |
parent | 3f7142fcfd75c7236529f8ad810fc7136c22795b (diff) | |
download | Nim-44d80dd86373b9ba41051428948eae30ed97acd3.tar.gz |
[bugfix] critbits styleCheck fix: consistent var naming (#11752)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/collections/critbits.nim | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/pure/collections/critbits.nim b/lib/pure/collections/critbits.nim index 493ae1ab6..4dddecd36 100644 --- a/lib/pure/collections/critbits.nim +++ b/lib/pure/collections/critbits.nim @@ -17,7 +17,7 @@ include "system/inclrtl" type NodeObj[T] {.acyclic.} = object byte: int ## byte index of the difference - otherbits: char + otherBits: char case isLeaf: bool of false: child: array[0..1, ref NodeObj[T]] of true: @@ -69,14 +69,14 @@ proc rawInsert[T](c: var CritBitTree[T], key: string): Node[T] = var newOtherBits = 0 var newByte = 0 block blockX: - while newbyte < key.len: - let ch = if newbyte < it.key.len: it.key[newbyte] else: '\0' - if ch != key[newbyte]: - newotherbits = ch.ord xor key[newbyte].ord + while newByte < key.len: + let ch = if newByte < it.key.len: it.key[newByte] else: '\0' + if ch != key[newByte]: + newOtherBits = ch.ord xor key[newByte].ord break blockX - inc newbyte - if newbyte < it.key.len: - newotherbits = it.key[newbyte].ord + inc newByte + if newByte < it.key.len: + newOtherBits = it.key[newByte].ord else: return it while (newOtherBits and (newOtherBits-1)) != 0: |