Mercurial > projects > dwt-mac
diff dwt/internal/image/PngLzBlockReader.d @ 7:e831403a80a9
Add 'cast' to casts
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 27 Aug 2008 14:30:35 +0200 |
parents | b903c16b6f48 |
children | 5123b17c98ef |
line wrap: on
line diff
--- a/dwt/internal/image/PngLzBlockReader.d Wed Aug 27 14:10:03 2008 +0200 +++ b/dwt/internal/image/PngLzBlockReader.d Wed Aug 27 14:30:35 2008 +0200 @@ -66,7 +66,7 @@ void readNextBlockHeader() { isLastBlock = stream.getNextIdatBit() !is 0; - compressionType = (byte)(stream.getNextIdatBits(2) & 0xFF); + compressionType = cast(byte)(stream.getNextIdatBits(2) & 0xFF); if (compressionType > 2) stream.error(); if (compressionType is UNCOMPRESSED) { @@ -136,10 +136,10 @@ int value = huffmanTables.getNextLiteralValue(stream); if (value < END_OF_COMPRESSED_BLOCK) { - window[windowIndex] = (byte) (value & 0xFF); + window[windowIndex] = cast(byte) (value & 0xFF); windowIndex++; if (windowIndex >= window.length) windowIndex = 0; - return (byte) (value & 0xFF); + return cast(byte) (value & 0xFF); } else if (value is END_OF_COMPRESSED_BLOCK) { readNextBlockHeader(); return getNextByte();