Commit 3ecc0304 authored by Christophe Geuzaine's avatar Christophe Geuzaine

Merge branch 'cppcheck' into 'master'

Cppcheck

See merge request !206
parents ac4decc2 43f99a1b
Pipeline #2729 passed with stage
in 57 minutes and 32 seconds
......@@ -110,9 +110,9 @@ bool SortEdgeConsecutive(const std::vector<MEdge> &e,
v.push_back(current);
std::map<MVertex *, std::pair<MVertex *, MVertex *> >::iterator it =
c.find(current);
c.erase(it);
MVertex *v1 = it->second.first;
MVertex *v2 = it->second.second;
c.erase(it);
MVertex *temp = current;
if(v1 == prev)
current = v2;
......
......@@ -1065,7 +1065,10 @@ bool meshGenerator(GFace *gf, int RECUR_ITER, bool repairSelfIntersecting1dMesh,
}
while(ite != edges.end()) {
if((*ite)->isSeam(gf)) return false;
if((*ite)->isSeam(gf)) {
if(fdeb != NULL) fclose(fdeb);
return false;
}
if(!(*ite)->isMeshDegenerated()) {
for(unsigned int i = 0; i < (*ite)->lines.size(); i++) {
MVertex *v1 = (*ite)->lines[i]->getVertex(0);
......
......@@ -433,7 +433,12 @@ void elasticitySolver::addDirichletBC(int dim, int entityId, int component,
case 0: diri.onWhat = BoundaryCondition::ON_VERTEX; break;
case 1: diri.onWhat = BoundaryCondition::ON_EDGE; break;
case 2: diri.onWhat = BoundaryCondition::ON_FACE; break;
default: return;
default:
{
delete diri.g;
delete diri._f;
return;
}
}
allDirichlet.push_back(diri);
}
......@@ -457,7 +462,12 @@ void elasticitySolver::addNeumannBC(int dim, int entityId,
case 0: neu.onWhat = BoundaryCondition::ON_VERTEX; break;
case 1: neu.onWhat = BoundaryCondition::ON_EDGE; break;
case 2: neu.onWhat = BoundaryCondition::ON_FACE; break;
default: return;
default:
{
delete neu.g;
delete neu._f;
return;
}
}
allNeumann.push_back(neu);
}
......
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