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

Fix return of reference to temporary

Sandro Stiller 4 лет назад
Родитель
Сommit
60b60d8efc
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      engine/source/2d/gui/guiSpriteCtrl.cc
  2. 1 1
      engine/source/2d/gui/guiSpriteCtrl.h

+ 1 - 1
engine/source/2d/gui/guiSpriteCtrl.cc

@@ -321,7 +321,7 @@ F32 GuiSpriteCtrl::getAspectRatio()
 	return 1.0;
 }
 
-Point2I& GuiSpriteCtrl::applyAlignment(RectI &bounds, Point2I &size)
+Point2I GuiSpriteCtrl::applyAlignment(RectI &bounds, Point2I &size)
 {
 	Point2I offset = Point2I(0, 0);
 

+ 1 - 1
engine/source/2d/gui/guiSpriteCtrl.h

@@ -77,7 +77,7 @@ public:
 	Point2I constrainLockX(Point2I &point);
 	Point2I constrainLockY(Point2I &point);
 	F32 getAspectRatio();
-	Point2I& applyAlignment(RectI &bounds, Point2I &size);
+	Point2I applyAlignment(RectI &bounds, Point2I &size);
 
 	//Animation Functions
 	void moveTo(S32 x, S32 y, S32 time, EasingFunction ease = Linear);