From 7e52c798db1f2754a002ea34a4d38c86a4234120 Mon Sep 17 00:00:00 2001 From: silent-observer Date: Tue, 5 Mar 2019 14:19:41 +0500 Subject: Remove var Shouldn't testing bit require only immutable access? I think this is a typo --- lib/pure/bitops.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/bitops.nim b/lib/pure/bitops.nim index 0eee3cd70..8cc5a9fed 100644 --- a/lib/pure/bitops.nim +++ b/lib/pure/bitops.nim @@ -97,7 +97,7 @@ when defined(nimHasalignOf): for bit in bits: result.add newCall("flipBit", v, bit) - proc testBit*[T: SomeInteger](v: var T, bit: BitsRange[T]): bool {.inline.} = + proc testBit*[T: SomeInteger](v: T, bit: BitsRange[T]): bool {.inline.} = ## Returns true if the bit in ``v`` at positions ``bit`` is set to 1 let mask = 1.T shl bit return (v and mask) == mask -- cgit 1.4.1-2-gfad0