aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2013-10-17 23:30:56 -0700
committerHarvey Harrison <[email protected]>2013-10-17 23:30:56 -0700
commita91fb6149a59393ea3491700652b9f0d562792d8 (patch)
tree8cd0a7281f18c0a671db1442dab80b6457eb6ff5
parentf1ae8ddb87c88a57dce4593f006881ef6a7f0932 (diff)
jogl: fix two impossible comparisons in glu/tessellator
The comparison to Long.MAX_VALUE will never trigger as it is coparing with an int. The intent of this code appears to be to check against Integer.MAX_VALUE which is used as an error code (unable to allocate sufficiently large array) from the priorityQueue. Signed-off-by: Harvey Harrison <[email protected]>
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java
index 364a7f198..d2c0db61e 100644
--- a/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java
+++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java
@@ -742,7 +742,7 @@ class Sweep {
eUp.Org.s = isect.s;
eUp.Org.t = isect.t;
eUp.Org.pqHandle = tess.pq.pqInsert(eUp.Org); /* __gl_pqSortInsert */
- if (eUp.Org.pqHandle == Long.MAX_VALUE) {
+ if (eUp.Org.pqHandle == Integer.MAX_VALUE) {
tess.pq.pqDeletePriorityQ(); /* __gl_pqSortDeletePriorityQ */
tess.pq = null;
throw new RuntimeException();
@@ -1242,7 +1242,7 @@ class Sweep {
vHead = tess.mesh.vHead;
for (v = vHead.next; v != vHead; v = v.next) {
v.pqHandle = pq.pqInsert(v); /* __gl_pqSortInsert */
- if (v.pqHandle == Long.MAX_VALUE) break;
+ if (v.pqHandle == Integer.MAX_VALUE) break;
}
if (v != vHead || !pq.pqInit()) { /* __gl_pqSortInit */
tess.pq.pqDeletePriorityQ(); /* __gl_pqSortDeletePriorityQ */