[cooja] skins/TrafficVisualizerSkin: Removed unnecessary 'historyCopy'

This commit is contained in:
Enrico Joerns 2014-06-11 00:47:34 +02:00
parent ea80fd9257
commit 468d533c41

View file

@ -192,11 +192,7 @@ public class TrafficVisualizerSkin implements VisualizerSkin {
@Override @Override
public void paintBeforeMotes(Graphics g) { public void paintBeforeMotes(Graphics g) {
RadioConnectionArrow[] historyCopy = history; for (RadioConnectionArrow connArrow : historyList) {
if (historyCopy == null) {
return;
}
for (RadioConnectionArrow connArrow : historyCopy) {
float colorHistoryIndex = (float)connArrow.getAge() / (float)connArrow.getMaxAge(); float colorHistoryIndex = (float)connArrow.getAge() / (float)connArrow.getMaxAge();
g.setColor(new Color(colorHistoryIndex, colorHistoryIndex, 1.0f)); g.setColor(new Color(colorHistoryIndex, colorHistoryIndex, 1.0f));
Radio source = connArrow.getConnection().getSource(); Radio source = connArrow.getConnection().getSource();