summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/cgram
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/jogamp/gluegen/cgram')
-rw-r--r--src/java/com/jogamp/gluegen/cgram/types/Type.java19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/java/com/jogamp/gluegen/cgram/types/Type.java b/src/java/com/jogamp/gluegen/cgram/types/Type.java
index 169d962..a269ae0 100644
--- a/src/java/com/jogamp/gluegen/cgram/types/Type.java
+++ b/src/java/com/jogamp/gluegen/cgram/types/Type.java
@@ -187,28 +187,23 @@ public abstract class Type implements Cloneable {
*/
@Override
public boolean equals(Object arg) {
- if (arg == this) {
+ if (arg == this)
return true;
- }
- if (arg == null || (!(arg instanceof Type))) {
+
+ if (!(arg instanceof Type))
return false;
- }
- Type t = (Type) arg;
+
+ Type t = (Type)arg;
if (size != t.size)
return false;
if (cvAttributes != t.cvAttributes)
return false;
- // Includes test for both names == null
- if (name == t.name)
- return true;
-
if (name != null)
return name.equals(t.name);
-
- // If we got here, name is null, t.name is not, they cannot compare equal
- return false;
+ else
+ return name == t.name;
}
/** Returns a string representation of this type. This string is not