aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Schweinsberg <[email protected]>2007-01-24 09:54:45 +0000
committerDavid Schweinsberg <[email protected]>2007-01-24 09:54:45 +0000
commitd217268bcad6779a112d19363b67175b07f1e2c2 (patch)
tree0223f3896db4302a6cc9197d2b77c3a59b933de2
parentf2fbf1663b354b09ced3bc68fc7104f5ae7470cf (diff)
Removed a few redundant casts to eliminate warnings.
-rw-r--r--src/net/java/dev/typecast/ot/OTFontCollection.java6
-rw-r--r--src/net/java/dev/typecast/ot/table/FeatureList.java4
-rw-r--r--src/net/java/dev/typecast/ot/table/GlyfCompositeDescript.java6
-rw-r--r--src/net/java/dev/typecast/ot/table/HmtxTable.java4
-rw-r--r--src/net/java/dev/typecast/ot/table/LocaTable.java6
-rw-r--r--src/net/java/dev/typecast/ot/table/ScriptList.java4
6 files changed, 15 insertions, 15 deletions
diff --git a/src/net/java/dev/typecast/ot/OTFontCollection.java b/src/net/java/dev/typecast/ot/OTFontCollection.java
index 6b0a790..04e6e7a 100644
--- a/src/net/java/dev/typecast/ot/OTFontCollection.java
+++ b/src/net/java/dev/typecast/ot/OTFontCollection.java
@@ -1,5 +1,5 @@
/*
- * $Id: OTFontCollection.java,v 1.3 2004-12-15 14:09:44 davidsch Exp $
+ * $Id: OTFontCollection.java,v 1.4 2007-01-24 09:54:45 davidsch Exp $
*
* Typecast - The Font Development Environment
*
@@ -39,7 +39,7 @@ import net.java.dev.typecast.ot.table.TTCHeader;
/**
*
* @author <a href="mailto:[email protected]">David Schweinsberg</a>
- * @version $Id: OTFontCollection.java,v 1.3 2004-12-15 14:09:44 davidsch Exp $
+ * @version $Id: OTFontCollection.java,v 1.4 2007-01-24 09:54:45 davidsch Exp $
*/
public class OTFontCollection {
@@ -84,7 +84,7 @@ public class OTFontCollection {
public Table getTable(DirectoryEntry de) {
for (int i = 0; i < _tables.size(); i++) {
- Table table = (Table) _tables.get(i);
+ Table table = _tables.get(i);
if ((table.getDirectoryEntry().getTag() == de.getTag()) &&
(table.getDirectoryEntry().getOffset() == de.getOffset())) {
return table;
diff --git a/src/net/java/dev/typecast/ot/table/FeatureList.java b/src/net/java/dev/typecast/ot/table/FeatureList.java
index edda0fc..8f17c46 100644
--- a/src/net/java/dev/typecast/ot/table/FeatureList.java
+++ b/src/net/java/dev/typecast/ot/table/FeatureList.java
@@ -56,7 +56,7 @@ import java.io.IOException;
/**
*
* @author <a href="mailto:[email protected]">David Schweinsberg</a>
- * @version $Id: FeatureList.java,v 1.2 2007-01-24 09:47:46 davidsch Exp $
+ * @version $Id: FeatureList.java,v 1.3 2007-01-24 09:54:44 davidsch Exp $
*/
public class FeatureList {
@@ -101,7 +101,7 @@ public class FeatureList {
if (tag.length() != 4) {
return null;
}
- int tagVal = (int)((tag.charAt(0)<<24)
+ int tagVal = ((tag.charAt(0)<<24)
| (tag.charAt(1)<<16)
| (tag.charAt(2)<<8)
| tag.charAt(3));
diff --git a/src/net/java/dev/typecast/ot/table/GlyfCompositeDescript.java b/src/net/java/dev/typecast/ot/table/GlyfCompositeDescript.java
index d836fb9..a3cdddf 100644
--- a/src/net/java/dev/typecast/ot/table/GlyfCompositeDescript.java
+++ b/src/net/java/dev/typecast/ot/table/GlyfCompositeDescript.java
@@ -60,7 +60,7 @@ import java.util.ArrayList;
* or more simple glyphs, usually with some sort of transformation applied to
* each.
*
- * @version $Id: GlyfCompositeDescript.java,v 1.3 2007-01-24 09:47:48 davidsch Exp $
+ * @version $Id: GlyfCompositeDescript.java,v 1.4 2007-01-24 09:54:44 davidsch Exp $
* @author <a href="mailto:[email protected]">David Schweinsberg</a>
*/
public class GlyfCompositeDescript extends GlyfDescript {
@@ -123,7 +123,7 @@ public class GlyfCompositeDescript extends GlyfDescript {
int y = gd.getYCoordinate(n);
short x1 = (short) c.scaleX(x, y);
x1 += c.getXTranslate();
- return (short) x1;
+ return x1;
}
return 0;
}
@@ -137,7 +137,7 @@ public class GlyfCompositeDescript extends GlyfDescript {
int y = gd.getYCoordinate(n);
short y1 = (short) c.scaleY(x, y);
y1 += c.getYTranslate();
- return (short) y1;
+ return y1;
}
return 0;
}
diff --git a/src/net/java/dev/typecast/ot/table/HmtxTable.java b/src/net/java/dev/typecast/ot/table/HmtxTable.java
index 3e95208..1d14df2 100644
--- a/src/net/java/dev/typecast/ot/table/HmtxTable.java
+++ b/src/net/java/dev/typecast/ot/table/HmtxTable.java
@@ -55,7 +55,7 @@ import java.io.DataInput;
import java.io.IOException;
/**
- * @version $Id: HmtxTable.java,v 1.2 2004-12-21 10:23:20 davidsch Exp $
+ * @version $Id: HmtxTable.java,v 1.3 2007-01-24 09:54:44 davidsch Exp $
* @author <a href="mailto:[email protected]">David Schweinsberg</a>
*/
public class HmtxTable implements Table {
@@ -78,7 +78,7 @@ public class HmtxTable implements Table {
_hMetrics = new int[numberOfHMetrics];
ByteArrayInputStream bais = new ByteArrayInputStream(_buf);
for (int i = 0; i < numberOfHMetrics; ++i) {
- _hMetrics[i] = (int)(bais.read()<<24 | bais.read()<<16 | bais.read()<<8 | bais.read());
+ _hMetrics[i] = bais.read()<<24 | bais.read()<<16 | bais.read()<<8 | bais.read();
}
_leftSideBearing = new short[lsbCount];
for (int i = 0; i < lsbCount; ++i) {
diff --git a/src/net/java/dev/typecast/ot/table/LocaTable.java b/src/net/java/dev/typecast/ot/table/LocaTable.java
index 6a70dbd..c796510 100644
--- a/src/net/java/dev/typecast/ot/table/LocaTable.java
+++ b/src/net/java/dev/typecast/ot/table/LocaTable.java
@@ -13,7 +13,7 @@ import java.io.DataInput;
import java.io.IOException;
/**
- * @version $Id: LocaTable.java,v 1.1.1.1 2004-12-05 23:14:50 davidsch Exp $
+ * @version $Id: LocaTable.java,v 1.2 2007-01-24 09:54:44 davidsch Exp $
* @author <a href="mailto:[email protected]">David Schweinsberg</a>
*/
public class LocaTable implements Table {
@@ -38,12 +38,12 @@ public class LocaTable implements Table {
if (shortEntries) {
factor = 2;
for (int i = 0; i <= numGlyphs; i++) {
- offsets[i] = (int)(bais.read()<<8 | bais.read());
+ offsets[i] = bais.read()<<8 | bais.read();
}
} else {
factor = 1;
for (int i = 0; i <= numGlyphs; i++) {
- offsets[i] = (int)(bais.read()<<24 | bais.read()<<16 | bais.read()<<8 | bais.read());
+ offsets[i] = bais.read()<<24 | bais.read()<<16 | bais.read()<<8 | bais.read();
}
}
buf = null;
diff --git a/src/net/java/dev/typecast/ot/table/ScriptList.java b/src/net/java/dev/typecast/ot/table/ScriptList.java
index 0aa213f..bd82a05 100644
--- a/src/net/java/dev/typecast/ot/table/ScriptList.java
+++ b/src/net/java/dev/typecast/ot/table/ScriptList.java
@@ -56,7 +56,7 @@ import java.io.IOException;
/**
*
* @author <a href="mailto:[email protected]">David Schweinsberg</a>
- * @version $Id: ScriptList.java,v 1.2 2007-01-24 09:47:46 davidsch Exp $
+ * @version $Id: ScriptList.java,v 1.3 2007-01-24 09:54:44 davidsch Exp $
*/
public class ScriptList {
@@ -99,7 +99,7 @@ public class ScriptList {
if (tag.length() != 4) {
return null;
}
- int tagVal = (int)((tag.charAt(0)<<24)
+ int tagVal = ((tag.charAt(0)<<24)
| (tag.charAt(1)<<16)
| (tag.charAt(2)<<8)
| tag.charAt(3));