nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib/core: remove uses of Byte for Text
[nit.git]
/
tests
/
shootout_nsieve_bytes_alt.nit
diff --git
a/tests/shootout_nsieve_bytes_alt.nit
b/tests/shootout_nsieve_bytes_alt.nit
index
6a05c79
..
73b3ee6
100644
(file)
--- a/
tests/shootout_nsieve_bytes_alt.nit
+++ b/
tests/shootout_nsieve_bytes_alt.nit
@@
-17,20
+17,20
@@
class Bitarray
var narr: Bytes
init do
var narr: Bytes
init do
- for x in [0 .. narr.length[ do narr[x] = 0xFFu8
+ for x in [0 .. narr.length[ do narr[x] = 0xFF
end
fun [](pos: Int): Bool do
pos -= 2
end
fun [](pos: Int): Bool do
pos -= 2
- return (narr[pos / 8] & (1u8 << (7 - pos % 8))) != 0u8
+ return (narr[pos / 8] & (1 << (7 - pos % 8))) != 0
end
fun []=(pos: Int, val: Bool) do
pos -= 2
if val then
end
fun []=(pos: Int, val: Bool) do
pos -= 2
if val then
- narr[pos / 8] |= 1u8 << (7 - pos % 8)
+ narr[pos / 8] |= 1 << (7 - pos % 8)
else
else
- narr[pos / 8] &= 0xFFu8 - (1u8 << (7 - pos % 8))
+ narr[pos / 8] &= 0xFF - (1 << (7 - pos % 8))
end
end
end
end
end
end