summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-11-06 06:17:41 +0100
committerSven Gothel <[email protected]>2010-11-06 06:17:41 +0100
commit8df147c4a1d7e2e5d63416a1bee979be858440d0 (patch)
tree32709ce1ce9c6c00ed806e61e36ad896b1862dd2 /src/jogl/classes/javax/media
parent1be7b5271ec1d08b6929a88dd811754d33d149de (diff)
Added fast path to equals impl.
Diffstat (limited to 'src/jogl/classes/javax/media')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLCapabilities.java1
-rw-r--r--src/jogl/classes/javax/media/opengl/GLProfile.java1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLCapabilities.java b/src/jogl/classes/javax/media/opengl/GLCapabilities.java
index 11d353e61..4368add3f 100644
--- a/src/jogl/classes/javax/media/opengl/GLCapabilities.java
+++ b/src/jogl/classes/javax/media/opengl/GLCapabilities.java
@@ -93,6 +93,7 @@ public class GLCapabilities extends Capabilities implements Cloneable {
}
public boolean equals(Object obj) {
+ if(this == obj) { return true; }
if(!(obj instanceof GLCapabilities)) {
return false;
}
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java
index 102a97a33..853d3e888 100644
--- a/src/jogl/classes/javax/media/opengl/GLProfile.java
+++ b/src/jogl/classes/javax/media/opengl/GLProfile.java
@@ -510,6 +510,7 @@ public class GLProfile {
* if both, profile and profileImpl is equal with this.
*/
public final boolean equals(Object o) {
+ if(this==o) { return true; }
if(o instanceof GLProfile) {
GLProfile glp = (GLProfile)o;
return profile.equals(glp.getName()) && profileImpl.equals(glp.getImplName()) ;