Просмотр исходного кода

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

Stephen Gold 3 лет назад
Родитель
Сommit
2b80f9e47f
1 измененных файлов с 1 добавлено и 1 удалено
  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();
     }
 
     /**