Forráskód Böngészése

Spatial: use short-circuit OR in requiresUpdates() -- more efficient (#1688)

Stephen Gold 3 éve
szülő
commit
2b80f9e47f
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      jme3-core/src/main/java/com/jme3/scene/Spatial.java

+ 1 - 1
jme3-core/src/main/java/com/jme3/scene/Spatial.java

@@ -230,7 +230,7 @@ public abstract class Spatial implements Savable, Cloneable, Collidable,
      * avoid exposing it to the public API since it is only used by Node.
      */
     boolean requiresUpdates() {
-        return requiresUpdates | !controls.isEmpty();
+        return requiresUpdates || !controls.isEmpty();
     }
 
     /**