comparison dwt/internal/image/JPEGSegment.d @ 7:e831403a80a9

Add 'cast' to casts
author Frank Benoit <benoit@tionex.de>
date Wed, 27 Aug 2008 14:30:35 +0200
parents 1a8b3cb347e0
children 5123b17c98ef
comparison
equal deleted inserted replaced
6:b903c16b6f48 7:e831403a80a9
32 public int getSegmentMarker() { 32 public int getSegmentMarker() {
33 return ((reference[0] & 0xFF) << 8 | (reference[1] & 0xFF)); 33 return ((reference[0] & 0xFF) << 8 | (reference[1] & 0xFF));
34 } 34 }
35 35
36 public void setSegmentMarker(int marker) { 36 public void setSegmentMarker(int marker) {
37 reference[0] = (byte)((marker & 0xFF00) >> 8); 37 reference[0] = cast(byte)((marker & 0xFF00) >> 8);
38 reference[1] = (byte)(marker & 0xFF); 38 reference[1] = cast(byte)(marker & 0xFF);
39 } 39 }
40 40
41 public int getSegmentLength() { 41 public int getSegmentLength() {
42 return ((reference[2] & 0xFF) << 8 | (reference[3] & 0xFF)); 42 return ((reference[2] & 0xFF) << 8 | (reference[3] & 0xFF));
43 } 43 }
44 44
45 public void setSegmentLength(int length) { 45 public void setSegmentLength(int length) {
46 reference[2] = (byte)((length & 0xFF00) >> 8); 46 reference[2] = cast(byte)((length & 0xFF00) >> 8);
47 reference[3] = (byte)(length & 0xFF); 47 reference[3] = cast(byte)(length & 0xFF);
48 } 48 }
49 49
50 public bool writeToStream(LEDataOutputStream byteStream) { 50 public bool writeToStream(LEDataOutputStream byteStream) {
51 try { 51 try {
52 byteStream.write(reference); 52 byteStream.write(reference);