[cpp] Fix passing argument by reference

This commit is contained in:
Mario Zechner 2024-11-05 13:27:01 +01:00
parent eef05281fd
commit 28fb83d1d7
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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;
}