summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}