diff options
author | silent-observer <maxmi@bk.ru> | 2019-03-05 14:19:41 +0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-05 14:19:41 +0500 |
commit | 7e52c798db1f2754a002ea34a4d38c86a4234120 (patch) | |
tree | e7637f44b0ee6572f7727919ce68f0b859ce833c | |
parent | aed8766e84364360e0ed1e1e667ee735afd99e81 (diff) | |
download | Nim-7e52c798db1f2754a002ea34a4d38c86a4234120.tar.gz |
Remove var
Shouldn't testing bit require only immutable access? I think this is a typo
-rw-r--r-- | lib/pure/bitops.nim | 2 |
1 files changed, 1 insertions, 1 deletions
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 |