mirror of https://github.com/axmolengine/axmol.git
Fix return reference to local temporary value (#1127)
* Fix invalid return type for temporary variable
This commit is contained in:
parent
4f8b5a25a9
commit
3eae9cf0f6
|
@ -200,7 +200,7 @@ void AnchoredSprite::setAnchorPoint(const Vec2& anchor)
|
||||||
updatePoly();
|
updatePoly();
|
||||||
}
|
}
|
||||||
|
|
||||||
const Rect& AnchoredSprite::getTouchRect()
|
Rect AnchoredSprite::getTouchRect()
|
||||||
{
|
{
|
||||||
Size s = getContentSize();
|
Size s = getContentSize();
|
||||||
Size a = _spriteVertexAnchor * s;
|
Size a = _spriteVertexAnchor * s;
|
||||||
|
|
|
@ -140,7 +140,7 @@ public:
|
||||||
/* This function will reposition the sprite's vertices itself instead of the node */
|
/* This function will reposition the sprite's vertices itself instead of the node */
|
||||||
virtual void setAnchorPoint(const Vec2& anchor) override;
|
virtual void setAnchorPoint(const Vec2& anchor) override;
|
||||||
/* Gets the hit area of the anchored sprite, this requires special calculations for shifted vertices and should be used with touch event listeners */
|
/* Gets the hit area of the anchored sprite, this requires special calculations for shifted vertices and should be used with touch event listeners */
|
||||||
virtual const Rect& getTouchRect();
|
virtual Rect getTouchRect();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void setVertexCoords(const Rect& rect, V3F_C4B_T2F_Quad* outQuad) override;
|
virtual void setVertexCoords(const Rect& rect, V3F_C4B_T2F_Quad* outQuad) override;
|
||||||
|
|
Loading…
Reference in New Issue