Browse Source

[cpp] Fix passing argument by reference

Mario Zechner 8 months ago
parent
commit
28fb83d1d7

+ 1 - 1
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);

+ 1 - 1
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;
 }