Fix #24775: boolean modifier crash in rendering on Mac. Problem was that this
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 26 Nov 2010 03:26:57 +0000 (03:26 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 26 Nov 2010 03:26:57 +0000 (03:26 +0000)
ran out of stack memory, now it passes some arguments by reference instead of
by value to use less stack space.

intern/boolop/intern/BOP_BSPNode.cpp
intern/boolop/intern/BOP_BSPNode.h

index d9b3941cf38298b1e60468a455ed17da6eb10678..ffb940bcf409aec8d768a5cdce751ac57ca64946 100644 (file)
@@ -59,7 +59,7 @@ BOP_BSPNode::~BOP_BSPNode()
  * @param plane face plane.
  */
 
-unsigned int BOP_BSPNode::addFace(BOP_BSPPoints pts,
+unsigned int BOP_BSPNode::addFace(const BOP_BSPPoints& pts,
                                                                  const MT_Plane3& plane )
 {
        unsigned int newDeep = 0;
index 9cc9a9d2a58d0a3b4460d88dde7ff02e2058cfaa..9ebd66976c4d19babc6778415915fbc2348d11eb 100644 (file)
@@ -33,7 +33,7 @@
 #include "BOP_Face.h"
 
 typedef vector<MT_Point3> BOP_BSPPoints;
-typedef vector<MT_Point3>::iterator BOP_IT_BSPPoints;
+typedef vector<MT_Point3>::const_iterator BOP_IT_BSPPoints;
 
 class BOP_BSPNode
 {
@@ -47,7 +47,7 @@ public:
        // Construction methods
        BOP_BSPNode(const MT_Plane3& plane);
        ~BOP_BSPNode();
-       unsigned int addFace(BOP_BSPPoints pts, 
+       unsigned int addFace(const BOP_BSPPoints& pts, 
                                                 const MT_Plane3& plane);
        BOP_TAG classifyFace(const MT_Point3& p1, 
                                                 const MT_Point3& p2,