From a91fb6149a59393ea3491700652b9f0d562792d8 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Thu, 17 Oct 2013 23:30:56 -0700 Subject: 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 --- src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl') 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 */ -- cgit v1.2.3