diff options
author | Michael Bien <[email protected]> | 2011-02-27 02:07:37 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2011-02-27 02:07:37 +0100 |
commit | 61d365bd7c352262bff711b3954731e7928c203f (patch) | |
tree | 38e4ebe7b19e80ca090090b6d722b0086df129a8 /src/com/jogamp/opencl/CLProgramBuilder.java | |
parent | ca1dee15d86d5c6327b3ffb6f4c85c6a5621e621 (diff) |
code review using findbugs
keyset iterations, typos, @Override, synchronization, varargs
Diffstat (limited to 'src/com/jogamp/opencl/CLProgramBuilder.java')
-rw-r--r-- | src/com/jogamp/opencl/CLProgramBuilder.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/jogamp/opencl/CLProgramBuilder.java b/src/com/jogamp/opencl/CLProgramBuilder.java index 00d4dab9..ece9ba36 100644 --- a/src/com/jogamp/opencl/CLProgramBuilder.java +++ b/src/com/jogamp/opencl/CLProgramBuilder.java @@ -55,7 +55,7 @@ import java.util.Set; * @see #loadConfiguration(java.io.ObjectInputStream, com.jogamp.opencl.CLContext) * @author Michael Bien */ -public final class CLProgramBuilder implements CLProgramConfiguration, Serializable { +public final class CLProgramBuilder implements CLProgramConfiguration, Serializable, Cloneable { static final long serialVersionUID = 42; @@ -185,8 +185,10 @@ public final class CLProgramBuilder implements CLProgramConfiguration, Serializa @Override public CLProgramBuilder withDefines(Map<String, ? extends Object> defines) { - for (String name : defines.keySet()) { - defineSet.add(CLProgram.define(name, defines.get(name))); + for (Map.Entry<String, ? extends Object> define : defines.entrySet()) { + String name = define.getKey(); + Object value = define.getValue(); + defineSet.add(CLProgram.define(name, value)); } return this; } @@ -319,10 +321,12 @@ public final class CLProgramBuilder implements CLProgramConfiguration, Serializa return builder; } + @Override public CLProgram getProgram() { return program; } + @Override public CLProgramBuilder setProgram(CLProgram program) { this.program = program; return this; |