consistent formatting: adjust cases of "dangling else", add curly braces

This commit is contained in:
Axel Kohlmeyer
2018-12-29 14:47:50 -05:00
parent c588b44cf1
commit 991ca25dd7
18 changed files with 127 additions and 196 deletions

View File

@ -308,7 +308,7 @@ int RegBlock::surface_exterior(double *x, double cutoff)
// could be edge or corner pt of block
// do not add contact point if r >= cutoff
if (!openflag){
if (!openflag) {
if (x[0] < xlo) xp = xlo;
else if (x[0] > xhi) xp = xhi;
else xp = x[0];
@ -318,13 +318,12 @@ int RegBlock::surface_exterior(double *x, double cutoff)
if (x[2] < zlo) zp = zlo;
else if (x[2] > zhi) zp = zhi;
else zp = x[2];
}
else{
} else {
mindist = BIG;
for (int i = 0; i < 6; i++){
if (open_faces[i]) continue;
dist = find_closest_point(i,x,xc,yc,zc);
if (dist < mindist){
if (dist < mindist) {
xp = xc;
yp = yc;
zp = zc;