Unverified Commit b4633a96 authored by Tristan Matthews's avatar Tristan Matthews Committed by GitHub

ec: simplify loop (#1184)

parent fe9d1115
......@@ -349,9 +349,7 @@ impl<S> WriterBase<S> {
// encoder or decoder claims to have used 1 bit.
let nbits = nbits_total << OD_BITRES;
let mut l = 0;
let mut i = OD_BITRES;
while i > 0 {
i -= 1;
for _ in 0..OD_BITRES {
rng = (rng * rng) >> 15;
let b = rng >> 16;
l = (l << 1) | b;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment