Resharper code cleanup

This commit is contained in:
Adam Hathcock
2013-04-28 12:32:55 +01:00
parent 2fe769afbb
commit fcf86b738e
230 changed files with 3909 additions and 4248 deletions

View File

@@ -34,7 +34,8 @@ namespace SharpCompress.Compressor.PPMd.I1
public void RangeEncoderNormalize(Stream stream)
{
while ((low ^ (low + range)) < RangeTop || range < RangeBottom && ((range = (uint) -low & (RangeBottom - 1)) != 0 || true))
while ((low ^ (low + range)) < RangeTop ||
range < RangeBottom && ((range = (uint) -low & (RangeBottom - 1)) != 0 || true))
{
stream.WriteByte((byte) (low >> 24));
range <<= 8;
@@ -44,13 +45,13 @@ namespace SharpCompress.Compressor.PPMd.I1
public void RangeEncodeSymbol()
{
low += LowCount * (range /= Scale);
low += LowCount*(range /= Scale);
range *= HighCount - LowCount;
}
public void RangeShiftEncodeSymbol(int rangeShift)
{
low += LowCount * (range >>= rangeShift);
low += LowCount*(range >>= rangeShift);
range *= HighCount - LowCount;
}
@@ -74,7 +75,8 @@ namespace SharpCompress.Compressor.PPMd.I1
public void RangeDecoderNormalize(Stream stream)
{
while ((low ^ (low + range)) < RangeTop || range < RangeBottom && ((range = (uint) -low & (RangeBottom - 1)) != 0 || true))
while ((low ^ (low + range)) < RangeTop ||
range < RangeBottom && ((range = (uint) -low & (RangeBottom - 1)) != 0 || true))
{
code = (code << 8) | (byte) stream.ReadByte();
range <<= 8;
@@ -84,18 +86,18 @@ namespace SharpCompress.Compressor.PPMd.I1
public uint RangeGetCurrentCount()
{
return (code - low) / (range /= Scale);
return (code - low)/(range /= Scale);
}
public uint RangeGetCurrentShiftCount(int rangeShift)
{
return (code - low) / (range >>= rangeShift);
return (code - low)/(range >>= rangeShift);
}
public void RangeRemoveSubrange()
{
low += range * LowCount;
low += range*LowCount;
range *= HighCount - LowCount;
}
}
}
}