aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph/font
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-08 22:03:51 +0200
committerSven Gothel <[email protected]>2014-07-08 22:03:51 +0200
commitf37592d54f3633c0f195a10770020cbb5a732809 (patch)
treece668d86ed7af7caecc30761762a78bef0f43fa7 /src/jogl/classes/jogamp/graph/font
parent815776c5760e42c8b3c858a9bab982b203c59c24 (diff)
Findbugs: Remove dead-code / unused [temp] storage and it's assignment
Diffstat (limited to 'src/jogl/classes/jogamp/graph/font')
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceMap.java17
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/ot/table/GposTable.java8
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/ot/table/GsubTable.java2
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtable.java4
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/t2/T2Interpreter.java10
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Interpreter.java31
6 files changed, 43 insertions, 29 deletions
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceMap.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceMap.java
index b22a06325..781e0adf3 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceMap.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceMap.java
@@ -31,19 +31,19 @@ import java.io.IOException;
public class ResourceMap {
private final byte[] headerCopy = new byte[16];
- private final int nextResourceMap;
- private final int fileReferenceNumber;
- private final int attributes;
+ // private final int nextResourceMap;
+ // private final int fileReferenceNumber;
+ // private final int attributes;
private final ResourceType[] types;
/** Creates new ResourceMap */
public ResourceMap(final DataInput di) throws IOException {
di.readFully(headerCopy);
- nextResourceMap = di.readInt();
- fileReferenceNumber = di.readUnsignedShort();
- attributes = di.readUnsignedShort();
- final int typeOffset = di.readUnsignedShort();
- final int nameOffset = di.readUnsignedShort();
+ /* nextResourceMap = */ di.readInt();
+ /* fileReferenceNumber = */ di.readUnsignedShort();
+ /* attributes = */ di.readUnsignedShort();
+ /* final int typeOffset = */ di.readUnsignedShort();
+ /* final int nameOffset = */ di.readUnsignedShort();
final int typeCount = di.readUnsignedShort() + 1;
// Read types
@@ -65,7 +65,6 @@ public class ResourceMap {
public ResourceType getResourceType(final String typeName) {
for (int i = 0; i < types.length; i++) {
- final String s = types[i].getTypeAsString();
if (types[i].getTypeAsString().equals(typeName)) {
return types[i];
}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GposTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GposTable.java
index f10d4e299..ce6f308db 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GposTable.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GposTable.java
@@ -36,10 +36,10 @@ public class GposTable implements Table {
_de = (DirectoryEntry) de.clone();
// GPOS Header
- final int version = di.readInt();
- final int scriptList = di.readInt();
- final int featureList = di.readInt();
- final int lookupList = di.readInt();
+ /* final int version = */ di.readInt();
+ /* final int scriptList = */ di.readInt();
+ /* final int featureList = */ di.readInt();
+ /* final int lookupList = */ di.readInt();
}
/** Get the table type, as a table directory value.
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GsubTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GsubTable.java
index f09973f99..3147fc8c5 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GsubTable.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GsubTable.java
@@ -76,7 +76,7 @@ public class GsubTable implements Table, LookupSubtableFactory {
final DataInputStream dis = new DataInputStream(new ByteArrayInputStream(buf));
// GSUB Header
- final int version = dis.readInt();
+ /* final int version = */ dis.readInt();
final int scriptListOffset = dis.readUnsignedShort();
final int featureListOffset = dis.readUnsignedShort();
final int lookupListOffset = dis.readUnsignedShort();
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtable.java
index df5d0394f..dcf02cb2b 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtable.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtable.java
@@ -28,8 +28,8 @@ public abstract class KernSubtable {
public static KernSubtable read(final DataInput di) throws IOException {
KernSubtable table = null;
- final int version = di.readUnsignedShort();
- final int length = di.readUnsignedShort();
+ /* final int version = */ di.readUnsignedShort();
+ /* final int length = */ di.readUnsignedShort();
final int coverage = di.readUnsignedShort();
final int format = coverage >> 8;
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/t2/T2Interpreter.java b/src/jogl/classes/jogamp/graph/font/typecast/t2/T2Interpreter.java
index 7bfb8cbd5..80d76a7f8 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/t2/T2Interpreter.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/t2/T2Interpreter.java
@@ -307,10 +307,20 @@ public class T2Interpreter {
dxb[count - i - 1] = popArg().intValue();
dya[count - i - 1] = popArg().intValue();
}
+ /**
+ * Not using the 'popped' arguments,
+ * hence simply pop them from stack!
+ *
final int dy3 = popArg().intValue();
final int dy2 = popArg().intValue();
final int dx2 = popArg().intValue();
final int dx1 = popArg().intValue();
+ */
+ popArg();
+ popArg();
+ popArg();
+ popArg();
+
for (int i = 0; i < count; ++i) {
final Point lastPoint = getLastPoint();
final int xa = lastPoint.x;
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Interpreter.java b/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Interpreter.java
index b296886cc..a7408e381 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Interpreter.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Interpreter.java
@@ -452,8 +452,8 @@ public class Interpreter {
/**
* JuMP Relative
*/
- private int _jmpr(int instructionIndex) {
- return instructionIndex += pop() - 1;
+ private int _jmpr(final int instructionIndex) {
+ return instructionIndex + ( pop() - 1 );
}
/**
@@ -484,7 +484,7 @@ public class Interpreter {
* LOOP and CALL function
*/
private void _loopcall() {
- final int index = pop();
+ /* final int index = */ pop();
final int count = pop();
for (int i = 0; i < count; i++) {
execute(functionMap[i]);
@@ -946,13 +946,13 @@ public class Interpreter {
private void _sfvtl(final short param) {
pop();
pop();
- if (param == 1) {
- gs.freedom_vector[0] = 0x0000;
- gs.freedom_vector[1] = 0x0000;
- } else {
+ // if (param == 1) {
gs.freedom_vector[0] = 0x0000;
gs.freedom_vector[1] = 0x0000;
- }
+ // } else {
+ // gs.freedom_vector[0] = 0x0000;
+ // gs.freedom_vector[1] = 0x0000;
+ //}
}
/**
@@ -1039,19 +1039,24 @@ public class Interpreter {
*/
private void _spvtl(final short param) {
+ // below block is dead code, reduce to pop() calls.
+ pop();
+ pop();
+ /**
// We'll get a copy of the line and normalize it -
// divide the x- and y-coords by the vector's dot product.
final Point p1 = zone[gs.zp2][pop()];
final Point p2 = zone[gs.zp1][pop()];
final int x = p2.x - p1.x;
final int y = p2.y - p1.y;
- if(param == 1) {
+ */
+ // if(param == 1) {
gs.projection_vector[0] = 0x0000;
gs.projection_vector[1] = 0x0000;
- } else {
- gs.projection_vector[0] = 0x0000;
- gs.projection_vector[1] = 0x0000;
- }
+ // } else {
+ // gs.projection_vector[0] = 0x0000;
+ // gs.projection_vector[1] = 0x0000;
+ // }
}
private void _sround() {