Merge pull request #2826 from federicobond/primitive-optimization

Optimize creation of boxed primitives
This commit is contained in:
Ben Fry
2014-08-28 11:02:02 -04:00
13 changed files with 35 additions and 35 deletions

View File

@@ -486,7 +486,7 @@ public class IntDict {
keys = PApplet.expand(keys);
values = PApplet.expand(values);
}
indices.put(what, new Integer(count));
indices.put(what, Integer.valueOf(count));
keys[count] = what;
values[count] = much;
count++;
@@ -532,8 +532,8 @@ public class IntDict {
keys[b] = tkey;
values[b] = tvalue;
indices.put(keys[a], new Integer(a));
indices.put(keys[b], new Integer(b));
indices.put(keys[a], Integer.valueOf(a));
indices.put(keys[b], Integer.valueOf(b));
}