From b7affd0147b789d274008eaf1fc1048f6c746734 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Tue, 10 Apr 2012 22:50:41 +0000 Subject: [PATCH] - optimize BatchNode a bit git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9286 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/scene/BatchNode.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/src/core/com/jme3/scene/BatchNode.java b/engine/src/core/com/jme3/scene/BatchNode.java index 687b45a2a..6b9035b7a 100644 --- a/engine/src/core/com/jme3/scene/BatchNode.java +++ b/engine/src/core/com/jme3/scene/BatchNode.java @@ -238,9 +238,9 @@ public class BatchNode extends Node implements Savable { List list = map.get(g.getMaterial()); if (list == null) { //trying to compare materials with the isEqual method - for (Material mat : map.keySet()) { - if (g.getMaterial().isEqual(mat)) { - list = map.get(mat); + for ( Map.Entry> mat : map.entrySet()) { + if (g.getMaterial().isEqual(mat.getKey())) { + list = mat.getValue(); } } }