Skip to content

Commit

Permalink
Use cocos2d::Rect to avoid ambiguity (cocos2d#18048)
Browse files Browse the repository at this point in the history
Signed-off-by: Ole Herman Schumacher Elgesem <[email protected]>
  • Loading branch information
olehermanse authored and minggo committed Jul 10, 2017
1 parent 4853c75 commit 1c55ad1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cocos/editor-support/spine/SkeletonRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ AttachmentVertices* SkeletonRenderer::getAttachmentVertices (spMeshAttachment* a
return (AttachmentVertices*)attachment->rendererObject;
}

Rect SkeletonRenderer::getBoundingBox () const {
cocos2d::Rect SkeletonRenderer::getBoundingBox () const {
float minX = FLT_MAX, minY = FLT_MAX, maxX = -FLT_MAX, maxY = -FLT_MAX;
float scaleX = getScaleX(), scaleY = getScaleY();
for (int i = 0; i < _skeleton->slotsCount; ++i) {
Expand All @@ -343,8 +343,8 @@ Rect SkeletonRenderer::getBoundingBox () const {
}
}
Vec2 position = getPosition();
if (minX == FLT_MAX) minX = minY = maxX = maxY = 0;
return Rect(position.x + minX, position.y + minY, maxX - minX, maxY - minY);
if (minX == FLT_MAX) minX = minY = maxX = maxY = 0;
return cocos2d::Rect(position.x + minX, position.y + minY, maxX - minX, maxY - minY);
}

// --- Convenience methods for Skeleton_* functions.
Expand Down

0 comments on commit 1c55ad1

Please sign in to comment.