Add -Wshadow=local to warnings and fix reported issues.

Fixes #25316.
This commit is contained in:
marxin
2019-02-12 21:10:08 +01:00
committed by Rémi Verschelde
parent 132e2f458d
commit 8d51618949
134 changed files with 1107 additions and 1110 deletions

View File

@ -916,34 +916,34 @@ void Octree<T, use_pairs, AL>::move(OctreeElementID p_id, const AABB &p_aabb) {
pass++;
for (typename List<typename Element::OctantOwner, AL>::Element *E = owners.front(); E;) {
for (typename List<typename Element::OctantOwner, AL>::Element *F = owners.front(); F;) {
Octant *o = E->get().octant;
typename List<typename Element::OctantOwner, AL>::Element *N = E->next();
Octant *o = F->get().octant;
typename List<typename Element::OctantOwner, AL>::Element *N = F->next();
/*
if (!use_pairs)
o->elements.erase( E->get().E );
o->elements.erase( F->get().E );
*/
if (use_pairs && e.pairable)
o->pairable_elements.erase(E->get().E);
o->pairable_elements.erase(F->get().E);
else
o->elements.erase(E->get().E);
o->elements.erase(F->get().E);
if (_remove_element_from_octant(&e, o, common_parent->parent)) {
owners.erase(E);
owners.erase(F);
}
E = N;
F = N;
}
if (use_pairs) {
//unpair child elements in anything that survived
for (typename List<typename Element::OctantOwner, AL>::Element *E = owners.front(); E; E = E->next()) {
for (typename List<typename Element::OctantOwner, AL>::Element *F = owners.front(); F; F = F->next()) {
Octant *o = E->get().octant;
Octant *o = F->get().octant;
// erase children pairs, unref ONCE
pass++;