[whatwg/encoding] Editorial: Clean up gb18030 math (#63)

Please clean up the math for 4-byte sequences in the gb18030 decoder to [perform the three multiplications by constant exprressions and then adding the results](https://github.com/hsivonen/encoding-rs/blob/5668dc4b18bc6bab5a90b023b643e112c2fe5674/src/gb18030.rs#L143). This both helps readability and reduces [data dependencies](https://en.wikipedia.org/wiki/Data_dependency#Implications) if the spec text is transcribed to code.

Please clean up the math for 4-byte sequence in the gb18030 encoder to [use the `%` operator with constant expressions on the high-hand side](https://github.com/hsivonen/encoding-rs/blob/5668dc4b18bc6bab5a90b023b643e112c2fe5674/src/gb18030.rs#L302). This helps readability and reduces data dependencies if the spec text is transcribed to code.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/encoding/issues/63

Received on Tuesday, 28 June 2016 10:41:49 UTC