On Fri, Dec 20, 2013 at 12:42 PM, Stefan Bodewig <[email protected]> wrote:
> On 2013-12-20, Gary Gregory wrote: > > > On Fri, Dec 20, 2013 at 12:21 PM, Emmanuel Bourg <[email protected]> > wrote: > > >> Le 20/12/2013 18:18, [email protected] a écrit : > > >>> Remove some unnecessary parentheses. > > >> I'd argue they make the code easier to read. Reading bit shifting code > >> is quite painful, some parentheses help greatly. > > > > That's why it's only "some" and not "all" unnecessary parentheses. > > > IMO: > > > tableSize = (1 << 8); > > agree in this case, but not with > > - value |= (nextByte << (8 * i)); > + value |= nextByte << 8 * i; > > < > http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java?r1=1552740&r2=1552739&pathrev=1552740 > > > > at least I need to think about it to be really sure * has precedence > over << > I've made some adjustments to this file in SVN. My intention was to not change the bit twiddling expressions, my mistake. Now we have: value |= nextByte << (8 * i); Gary > > Stefan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- E-Mail: [email protected] | [email protected] Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> Spring Batch in Action <http://www.manning.com/templier/> Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory
