Remove extra indents before if followed by if else

This was driving clangd crazy - replaced with indents between the if and conditional parentheses in most places.
This commit is contained in:
Connor Gibson
2025-05-30 13:40:01 -07:00
parent df8e4b9b42
commit b86be0969d
17 changed files with 70 additions and 76 deletions

View File

@@ -370,7 +370,7 @@ void lcd128x64rectangle (int x1, int y1, int x2, int y2, int colour, int filled)
if (filled)
{
/**/ if (x1 == x2)
if (x1 == x2)
lcd128x64line (x1, y1, x2, y2, colour) ;
else if (x1 < x2)
for (x = x1 ; x <= x2 ; ++x)

View File

@@ -47,12 +47,9 @@ void piGlow1 (const int leg, const int ring, const int intensity)
if ((leg < 0) || (leg > 2)) return ;
if ((ring < 0) || (ring > 5)) return ;
/**/ if (leg == 0)
legLeds = leg0 ;
else if (leg == 1)
legLeds = leg1 ;
else
legLeds = leg2 ;
if (leg == 0) { legLeds = leg0 ; }
else if (leg == 1) { legLeds = leg1 ; }
else { legLeds = leg2 ; }
analogWrite (PIGLOW_BASE + legLeds [ring], intensity) ;
}
@@ -71,12 +68,9 @@ void piGlowLeg (const int leg, const int intensity)
if ((leg < 0) || (leg > 2))
return ;
/**/ if (leg == 0)
legLeds = leg0 ;
else if (leg == 1)
legLeds = leg1 ;
else
legLeds = leg2 ;
if (leg == 0) { legLeds = leg0 ; }
else if (leg == 1) { legLeds = leg1 ; }
else { legLeds = leg2 ; }
for (i = 0 ; i < 6 ; ++i)
analogWrite (PIGLOW_BASE + legLeds [i], intensity) ;

View File

@@ -210,19 +210,21 @@ void scrollPhatRectangle (int x1, int y1, int x2, int y2, int colour, int filled
{
register int x ;
if (filled)
{
/**/ if (x1 == x2)
if (filled) {
if (x1 == x2) {
scrollPhatLine (x1, y1, x2, y2, colour) ;
else if (x1 < x2)
for (x = x1 ; x <= x2 ; ++x)
scrollPhatLine (x, y1, x, y2, colour) ;
else
for (x = x2 ; x <= x1 ; ++x)
scrollPhatLine (x, y1, x, y2, colour) ;
}
else
{
}
else if (x1 < x2) {
for (x = x1 ; x <= x2 ; ++x) {
scrollPhatLine (x, y1, x, y2, colour) ;
}
}
else {
for (x = x2 ; x <= x1 ; ++x) {
scrollPhatLine (x, y1, x, y2, colour) ;
}
}
} else {
scrollPhatLine (x1, y1, x2, y1, colour) ;
scrollPhatLineTo (x2, y2, colour) ;
scrollPhatLineTo (x1, y2, colour) ;