mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Fixes related to r312: gcc refuses to erase a const_iterator
This commit is contained in:
@@ -1193,7 +1193,7 @@ void IfcFile::removeEntity(IfcUtil::IfcBaseClass* entity) {
|
||||
IfcEntityListList::ptr new_list(new IfcEntityListList);
|
||||
for (IfcEntityListList::outer_it it = instance_list_list->begin(); it != instance_list_list->end(); ++it) {
|
||||
std::vector<IfcUtil::IfcBaseClass*> instances = *it;
|
||||
std::vector<IfcUtil::IfcBaseClass*>::const_iterator jt;
|
||||
std::vector<IfcUtil::IfcBaseClass*>::iterator jt;
|
||||
while ((jt = std::find(instances.begin(), instances.end(), entity)) != instances.end()) {
|
||||
instances.erase(jt);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ bool IfcEntityList::contains(IfcUtil::IfcBaseClass* instance) const {
|
||||
return std::find(ls.begin(), ls.end(), instance) != ls.end();
|
||||
}
|
||||
void IfcEntityList::remove(IfcUtil::IfcBaseClass* instance) {
|
||||
std::vector<IfcUtil::IfcBaseClass*>::const_iterator it;
|
||||
std::vector<IfcUtil::IfcBaseClass*>::iterator it;
|
||||
while ((it = std::find(ls.begin(), ls.end(), instance)) != ls.end()) {
|
||||
ls.erase(it);
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
return r;
|
||||
}
|
||||
void remove(T* t) {
|
||||
typename std::vector<T*>::const_iterator it;
|
||||
typename std::vector<T*>::iterator it;
|
||||
while ((it = std::find(ls.begin(), ls.end(), t)) != ls.end()) {
|
||||
ls.erase(it);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user