Commit 1ac4c000 authored by Anton Gladky's avatar Anton Gladky

Remove patch applied by upstream.

parent f64cbd90
From 538d320f9a25b399ae6a19ba0c5517a0ec8c5bcf Mon Sep 17 00:00:00 2001
From: Anton Gladky <gladky.anton@gmail.com>
Date: Sun, 31 Aug 2014 11:48:55 +0200
Subject: [PATCH] Create an array of clump`s memberIds to remove.
During the clump removal with all its members
there is a situtation on 32-bit platforms, that
the memberId is not defined correctly after one
of clump member is already removed.
Create a "static" array of all ids and iterate
over them.
---
core/BodyContainer.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/core/BodyContainer.cpp b/core/BodyContainer.cpp
index 2d9c2a6..2edaa66 100644
--- a/core/BodyContainer.cpp
+++ b/core/BodyContainer.cpp
@@ -41,8 +41,9 @@ bool BodyContainer::erase(Body::id_t id, bool eraseClumpMembers){//default is fa
//erase all members if eraseClumpMembers is true:
const shared_ptr<Clump>& clump=YADE_PTR_CAST<Clump>(b->shape);
std::map<Body::id_t,Se3r>& members = clump->members;
- FOREACH(MemberMap::value_type& mm, members){
- const Body::id_t& memberId=mm.first;
+ std::vector<Body::id_t> idsToRemove;
+ FOREACH(MemberMap::value_type mm, members) idsToRemove.push_back(mm.first); // Prepare an array of ids, which need to be removed.
+ FOREACH(Body::id_t memberId, idsToRemove){
if (eraseClumpMembers) {
this->erase(memberId,false); // erase members
} else {
01_remove_google_analytics.patch
03_fix_i386_segfault.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment