From dd30bab480f59e4bb4ab8fad5aabd13c08aa1b11 Mon Sep 17 00:00:00 2001 From: Oscar Campbell Date: Mon, 1 Jun 2015 23:49:04 +0200 Subject: Restructure branching slighty. Fix error message. --- lib/pure/hashes.nim | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/pure/hashes.nim b/lib/pure/hashes.nim index c6af8f918..132264e4a 100644 --- a/lib/pure/hashes.nim +++ b/lib/pure/hashes.nim @@ -130,14 +130,13 @@ proc hashIgnoreStyle*(x: string): THash = var c = x[i] if c == '_': inc(i) - continue # skip _ - if isMagicIdentSeparatorRune(cstring(x), i): + elif isMagicIdentSeparatorRune(cstring(x), i): inc(i, magicIdentSeparatorRuneByteWidth) - continue # skip 'ยท' (unicode middle dot) - if c in {'A'..'Z'}: - c = chr(ord(c) + (ord('a') - ord('A'))) # toLower() - h = h !& ord(c) - inc(i) + else: + if c in {'A'..'Z'}: + c = chr(ord(c) + (ord('a') - ord('A'))) # toLower() + h = h !& ord(c) + inc(i) result = !$h -- cgit 1.4.1-2-gfad0