Mercurial > projects > dwt-mac
comparison dwt/internal/image/PngDecodingDataStream.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 |
comparison
equal
deleted
inserted
replaced
6:b903c16b6f48 | 7:e831403a80a9 |
---|---|
68 } | 68 } |
69 return (currentByte & (1 << nextBitIndex)) >> nextBitIndex++; | 69 return (currentByte & (1 << nextBitIndex)) >> nextBitIndex++; |
70 } | 70 } |
71 | 71 |
72 byte getNextIdatByte() { | 72 byte getNextIdatByte() { |
73 byte nextByte = (byte)stream.read(); | 73 byte nextByte = cast(byte)stream.read(); |
74 nextBitIndex = MAX_BIT + 1; | 74 nextBitIndex = MAX_BIT + 1; |
75 return nextByte; | 75 return nextByte; |
76 } | 76 } |
77 | 77 |
78 void updateAdler(byte value) { | 78 void updateAdler(byte value) { |
92 | 92 |
93 public int read(byte[] buffer, int off, int len) { | 93 public int read(byte[] buffer, int off, int len) { |
94 for (int i = 0; i < len; i++) { | 94 for (int i = 0; i < len; i++) { |
95 int b = read(); | 95 int b = read(); |
96 if (b is -1) return i; | 96 if (b is -1) return i; |
97 buffer[off + i] = (byte)b; | 97 buffer[off + i] = cast(byte)b; |
98 } | 98 } |
99 return len; | 99 return len; |
100 } | 100 } |
101 | 101 |
102 void error() { | 102 void error() { |