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
9720265ba6
commit
4c90ac17a4
|
@ -200,7 +200,7 @@ void AnchoredSprite::setAnchorPoint(const Vec2& anchor)
|
|||
updatePoly();
|
||||
}
|
||||
|
||||
const Rect& AnchoredSprite::getTouchRect()
|
||||
Rect AnchoredSprite::getTouchRect()
|
||||
{
|
||||
Size s = getContentSize();
|
||||
Size a = _spriteVertexAnchor * s;
|
||||
|
|
|
@ -140,7 +140,7 @@ public:
|
|||
/* This function will reposition the sprite's vertices itself instead of the node */
|
||||
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 */
|
||||
virtual const Rect& getTouchRect();
|
||||
virtual Rect getTouchRect();
|
||||
|
||||
protected:
|
||||
virtual void setVertexCoords(const Rect& rect, V3F_C4B_T2F_Quad* outQuad) override;
|
||||
|
|
Loading…
Reference in New Issue