ok.. updated to use braces


On 16 July 2013 22:22, Adam Hathcock <notifications@github.com> wrote:

> In SharpCompress/Common/Rar/RarCryptoWrapper.cs:
>
> > +        {
> > +            int queueSize = _data.Count;
> > +            int sizeToRead = count - queueSize;
> > +
> > +            if (sizeToRead > 0)
> > +            {
> > +                int alignedSize = sizeToRead + ((~sizeToRead + 1) & 0xf);
> > +                for (int i = 0; i < alignedSize/16; i++)
> > +                {
> > +                    //long ax = System.currentTimeMillis();
> > +                    byte[] cipherText = new byte[RarRijndael.CryptoBlockSize];
> > +                    _actualStream.Read(cipherText, 0, RarRijndael.CryptoBlockSize);
> > +
> > +                    var readBytes = _rijndael.ProcessBlock(cipherText);
> > +                    foreach(var readByte in readBytes)
> > +                        _data.Enqueue(readByte);
>
> It does add more lines yes. However, there are two reasons I do it. First,
> it just makes it perfectly clear on a quick skim of the code that a line is
> nested. Second, and probably more important, merging goes a lot smoother
> with the nesting. I've shot myself in the foot with merging because the
> tool couldn't see the differences with the single line versus the nested
> approach.
>
> Having a couple of extra lines because of braces never hurt anyone :) Of
> course, you can write some nasty code because of too many levels of nesting
> in a method, but that's a different story.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/adamhathcock/sharpcompress/pull/1/files#r5216560>
> .
>