diff --git a/spine-cpp/spine-cpp/include/spine/SkeletonBounds.h b/spine-cpp/spine-cpp/include/spine/SkeletonBounds.h index 8dc4cab51..5083e356f 100644 --- a/spine-cpp/spine-cpp/include/spine/SkeletonBounds.h +++ b/spine-cpp/spine-cpp/include/spine/SkeletonBounds.h @@ -65,7 +65,7 @@ namespace spine { bool aabbintersectsSegment(float x1, float y1, float x2, float y2); /// Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. - bool aabbIntersectsSkeleton(SkeletonBounds bounds); + bool aabbIntersectsSkeleton(SkeletonBounds &bounds); /// Returns true if the polygon contains the point. bool containsPoint(Polygon *polygon, float x, float y); diff --git a/spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp b/spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp index 9f1e00cd8..a9decdedc 100644 --- a/spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp +++ b/spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp @@ -118,7 +118,7 @@ bool SkeletonBounds::aabbintersectsSegment(float x1, float y1, float x2, float y return false; } -bool SkeletonBounds::aabbIntersectsSkeleton(SkeletonBounds bounds) { +bool SkeletonBounds::aabbIntersectsSkeleton(SkeletonBounds &bounds) { return _minX < bounds._maxX && _maxX > bounds._minX && _minY < bounds._maxY && _maxY > bounds._minY; }