From 9a6fee750ae8c72009b67f7454807ad892219dd0 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 26 Nov 2010 03:26:57 +0000 Subject: Fix #24775: boolean modifier crash in rendering on Mac. Problem was that this 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 | 2 +- intern/boolop/intern/BOP_BSPNode.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'intern/boolop') diff --git a/intern/boolop/intern/BOP_BSPNode.cpp b/intern/boolop/intern/BOP_BSPNode.cpp index d9b3941cf38..ffb940bcf40 100644 --- a/intern/boolop/intern/BOP_BSPNode.cpp +++ b/intern/boolop/intern/BOP_BSPNode.cpp @@ -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; diff --git a/intern/boolop/intern/BOP_BSPNode.h b/intern/boolop/intern/BOP_BSPNode.h index 9cc9a9d2a58..9ebd66976c4 100644 --- a/intern/boolop/intern/BOP_BSPNode.h +++ b/intern/boolop/intern/BOP_BSPNode.h @@ -33,7 +33,7 @@ #include "BOP_Face.h" typedef vector BOP_BSPPoints; -typedef vector::iterator BOP_IT_BSPPoints; +typedef vector::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, -- cgit v1.2.3