aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-10-17 18:42:32 +0200
committerSven Gothel <[email protected]>2012-10-17 18:42:32 +0200
commit73e8828566404e864170688dfb4fd530a83f8add (patch)
tree2f7e96caf71fd29cfef765f71d951fe7e326f3f4 /src/java/com/jogamp
parent43b672e66b2392e1d11b7a4f0d15c3794921c9c8 (diff)
Minor revert of clone replacement w/ copt-ctor of commit d7fb6a7bcfbd2d5ac452abdcdd31fb4d71441c70
clone of ArrayList is more shallow than it's clone operation (?)
Diffstat (limited to 'src/java/com/jogamp')
-rw-r--r--src/java/com/jogamp/gluegen/cgram/types/CompoundType.java3
-rw-r--r--src/java/com/jogamp/gluegen/cgram/types/EnumType.java3
-rw-r--r--src/java/com/jogamp/gluegen/cgram/types/FunctionType.java5
3 files changed, 7 insertions, 4 deletions
diff --git a/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java b/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java
index 746212d..8893283 100644
--- a/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java
+++ b/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java
@@ -71,10 +71,11 @@ public abstract class CompoundType extends MemoryLayoutType implements Cloneable
}
}
+ @SuppressWarnings("unchecked")
public Object clone() {
CompoundType n = (CompoundType) super.clone();
if(null!=this.fields) {
- n.fields = new ArrayList<Field>(this.fields);
+ n.fields = (ArrayList<Field>) this.fields.clone();
}
return n;
}
diff --git a/src/java/com/jogamp/gluegen/cgram/types/EnumType.java b/src/java/com/jogamp/gluegen/cgram/types/EnumType.java
index d21774f..99d0f7e 100644
--- a/src/java/com/jogamp/gluegen/cgram/types/EnumType.java
+++ b/src/java/com/jogamp/gluegen/cgram/types/EnumType.java
@@ -85,13 +85,14 @@ public class EnumType extends IntType implements Cloneable {
this.underlyingType = underlyingType;
}
+ @SuppressWarnings("unchecked")
public Object clone() {
EnumType n = (EnumType) super.clone();
if(null!=this.underlyingType) {
n.underlyingType = (IntType) this.underlyingType.clone();
}
if(null!=this.enums) {
- n.enums = new ArrayList<Enum>(this.enums);
+ n.enums = (ArrayList<Enum>) this.enums.clone();
}
return n;
}
diff --git a/src/java/com/jogamp/gluegen/cgram/types/FunctionType.java b/src/java/com/jogamp/gluegen/cgram/types/FunctionType.java
index fcaf97b..ca625cb 100644
--- a/src/java/com/jogamp/gluegen/cgram/types/FunctionType.java
+++ b/src/java/com/jogamp/gluegen/cgram/types/FunctionType.java
@@ -54,13 +54,14 @@ public class FunctionType extends Type implements Cloneable {
this.returnType = returnType;
}
+ @SuppressWarnings("unchecked")
public Object clone() {
FunctionType n = (FunctionType) super.clone();
if(null!=this.argumentTypes) {
- n.argumentTypes = new ArrayList<Type>(this.argumentTypes);
+ n.argumentTypes = (ArrayList<Type>) this.argumentTypes.clone();
}
if(null!=this.argumentNames) {
- n.argumentNames = new ArrayList<String>(this.argumentNames);
+ n.argumentNames = (ArrayList<String>) this.argumentNames.clone();
}
return n;
}