forked from External/mage
performance: improved CPU usage in games with big amount of permanents (related to #11285)
This commit is contained in:
parent
1f50f95f8b
commit
70c79fd6a6
4 changed files with 14 additions and 5 deletions
|
|
@ -24,11 +24,16 @@ public class AbilitiesImpl<T extends Ability> extends ArrayList<T> implements Ab
|
|||
|
||||
private static final ThreadLocalStringBuilder threadLocalBuilder = new ThreadLocalStringBuilder(200);
|
||||
|
||||
public AbilitiesImpl() {
|
||||
// fast constructor
|
||||
}
|
||||
|
||||
public AbilitiesImpl(T... abilities) {
|
||||
Collections.addAll(this, abilities);
|
||||
}
|
||||
|
||||
public AbilitiesImpl(final AbilitiesImpl<T> abilities) {
|
||||
this.ensureCapacity(abilities.size());
|
||||
for (T ability : abilities) {
|
||||
this.add((T) ability.copy());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue