From 44d80dd86373b9ba41051428948eae30ed97acd3 Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Tue, 16 Jul 2019 15:24:09 -0400 Subject: [bugfix] critbits styleCheck fix: consistent var naming (#11752) --- lib/pure/collections/critbits.nim | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib') 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: -- cgit 1.4.1-2-gfad0