mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 02:36:59 +00:00
Performance pass 1 (Fix array size)
This commit is contained in:
parent
c84c462aeb
commit
f8f8b884bc
@ -298,7 +298,7 @@ public class NoiseExplorer extends JPanel implements MouseWheelListener
|
||||
NoiseExplorer nv = new NoiseExplorer();
|
||||
frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
|
||||
KList<String> li = new KList<NoiseStyle>(NoiseStyle.values()).toStringList();
|
||||
combo = new JComboBox<String>(li.toArray(new String[li.size()]));
|
||||
combo = new JComboBox<String>(li.toArray(new String[0]));
|
||||
combo.setSelectedItem("STATIC");
|
||||
combo.setFocusable(false);
|
||||
combo.addActionListener(new ActionListener()
|
||||
|
@ -133,7 +133,7 @@ public class B
|
||||
}
|
||||
}
|
||||
|
||||
return bt.toArray(new String[bt.size()]);
|
||||
return bt.toArray(new String[0]);
|
||||
}
|
||||
|
||||
public static String[] getItemTypes()
|
||||
@ -146,7 +146,7 @@ public class B
|
||||
bt.add(v);
|
||||
}
|
||||
|
||||
return bt.toArray(new String[bt.size()]);
|
||||
return bt.toArray(new String[0]);
|
||||
}
|
||||
|
||||
public static BlockData getBlockData(String bdxf, IrisDimension resolver)
|
||||
|
@ -153,7 +153,7 @@ public class ObjectResourceLoader extends ResourceLoader<IrisObject>
|
||||
}
|
||||
|
||||
KList<String> v = new KList<>(m);
|
||||
possibleKeys = v.toArray(new String[v.size()]);
|
||||
possibleKeys = v.toArray(new String[0]);
|
||||
return possibleKeys;
|
||||
}
|
||||
|
||||
@ -201,7 +201,7 @@ public class ObjectResourceLoader extends ResourceLoader<IrisObject>
|
||||
}
|
||||
|
||||
KList<String> v = new KList<>(m);
|
||||
possibleKeys = v.toArray(new String[v.size()]);
|
||||
possibleKeys = v.toArray(new String[0]);
|
||||
return possibleKeys;
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ public class ResourceLoader<T extends IrisRegistrant>
|
||||
}
|
||||
|
||||
KList<String> v = new KList<>(m);
|
||||
preferredKeys = v.toArray(new String[v.size()]);
|
||||
preferredKeys = v.toArray(new String[0]);
|
||||
return preferredKeys;
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ public class ResourceLoader<T extends IrisRegistrant>
|
||||
}
|
||||
|
||||
KList<String> v = new KList<>(m);
|
||||
possibleKeys = v.toArray(new String[v.size()]);
|
||||
possibleKeys = v.toArray(new String[0]);
|
||||
return possibleKeys;
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ public class V
|
||||
|
||||
try
|
||||
{
|
||||
return (local ? Violator.getDeclaredMethod(o.getClass(), method, par.toArray(new Class<?>[par.size()])) : Violator.getMethod(o.getClass(), method, par.toArray(new Class<?>[par.size()]))).invoke(o, parameters);
|
||||
return (local ? Violator.getDeclaredMethod(o.getClass(), method, par.toArray(new Class<?>[0])) : Violator.getMethod(o.getClass(), method, par.toArray(new Class<?>[0]))).invoke(o, parameters);
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
|
@ -191,7 +191,7 @@ public class Violator
|
||||
|
||||
try
|
||||
{
|
||||
Constructor<?> co = getConstructor(c, cv.toArray(new Class<?>[cv.size()]));
|
||||
Constructor<?> co = getConstructor(c, cv.toArray(new Class<?>[0]));
|
||||
return (T) co.newInstance(parameters);
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ public class VirtualCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
return command.handle(vs, chain.toArray(new String[chain.size()]));
|
||||
return command.handle(vs, chain.toArray(new String[0]));
|
||||
}
|
||||
|
||||
private boolean checkPermissions(CommandSender sender, ICommand command2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user