mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 00:38:14 +01:00
Place iterate params after vars, not before
This commit is contained in:
1 parent
79aded4797
commit
282b9c4b20
4 files changed
+12
-12
No files matched your search
@@ -34,7 +34,7 @@ pub func hasher.update(x slice base.u8)(checksum base.u32) {
|
||||
in.x = in.x[:5552]
|
||||
}
|
||||
|
||||
iterate (length:1, unroll:8)(p slice base.u8 =: in.x) {
|
||||
iterate (p slice base.u8 =: in.x)(length:1, unroll:8) {
|
||||
s1 ~mod+= p[0] as base.u32
|
||||
s2 ~mod+= s1
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ pub struct ieee_hasher?(
|
||||
pub func ieee_hasher.update(x slice base.u8)(checksum base.u32) {
|
||||
var s base.u32 = 0xFFFFFFFF ^ this.state
|
||||
|
||||
iterate (length:8, unroll:8)(p slice base.u8 =: in.x) {
|
||||
iterate (p slice base.u8 =: in.x)(length:8, unroll:8) {
|
||||
// TODO: explain the slicing-by-8 algorithm.
|
||||
s ^= ((p[0] as base.u32) << 0) |
|
||||
((p[1] as base.u32) << 8) |
|
||||
|
||||
Reference in new issue
Block a user