mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 00:47:28 +01:00
Place more vars at the top of functions
This commit is contained in:
1 parent
bac74a830d
commit
25776a724e
4 files changed
+38
-15
No files matched your search
@@ -22,16 +22,20 @@ pub func hasher.update!(x slice base.u8) base.u32 {
|
||||
// The Adler-32 checksum's magic 65521 and 5552 numbers are discussed in
|
||||
// RFC 1950.
|
||||
|
||||
var s1 base.u32
|
||||
var s2 base.u32
|
||||
var remaining slice base.u8
|
||||
|
||||
if not this.started {
|
||||
this.started = true
|
||||
this.state = 1
|
||||
}
|
||||
|
||||
var s1 base.u32 = this.state.low_bits(n:16)
|
||||
var s2 base.u32 = this.state.high_bits(n:16)
|
||||
s1 = this.state.low_bits(n:16)
|
||||
s2 = this.state.high_bits(n:16)
|
||||
|
||||
while args.x.length() > 0 {
|
||||
var remaining slice base.u8
|
||||
remaining = args.x[:0]
|
||||
if args.x.length() > 5552 {
|
||||
remaining = args.x[5552:]
|
||||
args.x = args.x[:5552]
|
||||
|
||||
Reference in new issue
Block a user