Factor out a writeIterateRound method

This commit is contained in:
Nigel Tao committed 2018-05-04 14:19:58 +10:00
1 parent 7bd37588b1
commit 5c25b0e1d1
3 files changed
+29 -43

No files matched your search

+2 -2
View File
@@ -1693,8 +1693,8 @@ uint32_t wuffs_adler32__hasher__update(wuffs_adler32__hasher* self,
v_p.ptr += 1;
}
v_p.len = 1;
uint8_t* i_end2_p = i_slice_p.ptr + i_slice_p.len;
while (v_p.ptr < i_end2_p) {
uint8_t* i_end1_p = i_slice_p.ptr + (i_slice_p.len / 1) * 1;
while (v_p.ptr < i_end1_p) {
v_s1 += ((uint32_t)(v_p.ptr[0]));
v_s2 += v_s1;
v_p.ptr += 1;
+1 -1
View File
@@ -2133,7 +2133,7 @@ uint32_t wuffs_crc32__ieee_hasher__update(wuffs_crc32__ieee_hasher* self,
v_p.ptr += 8;
}
v_p.len = 1;
uint8_t* i_end2_p = i_slice_p.ptr + i_slice_p.len;
uint8_t* i_end2_p = i_slice_p.ptr + (i_slice_p.len / 1) * 1;
while (v_p.ptr < i_end2_p) {
v_s = (wuffs_crc32__ieee_table[0][((uint8_t)((v_s & 255))) ^ v_p.ptr[0]] ^
(v_s >> 8));