Pārlūkot izejas kodu

Remove 'new Vector3f()' (#2326)

Removed unnecessary instantiation of 'Vector3f' objects on setWidth() and setHeight() methods.
Francivan Bezerra 10 mēneši atpakaļ
vecāks
revīzija
d3d6d9e670
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      jme3-core/src/main/java/com/jme3/ui/Picture.java

+ 2 - 2
jme3-core/src/main/java/com/jme3/ui/Picture.java

@@ -113,7 +113,7 @@ public class Picture extends Geometry {
      */
     public void setWidth(float width){
         this.width = width;
-        setLocalScale(new Vector3f(width, height, 1f));
+        setLocalScale(width, height, 1f);
     }
 
     /**
@@ -125,7 +125,7 @@ public class Picture extends Geometry {
      */
     public void setHeight(float height){
         this.height = height;
-        setLocalScale(new Vector3f(width, height, 1f));
+        setLocalScale(width, height, 1f);
     }
 
     /**