mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
RectangleList: Remove some curly braces
This commit is contained in:
parent
e525e12061
commit
92573ca1ad
1 changed files with 91 additions and 95 deletions
|
|
@ -212,8 +212,11 @@ public:
|
|||
*/
|
||||
void subtract (const RectangleType rect)
|
||||
{
|
||||
if (auto numRects = rects.size())
|
||||
{
|
||||
const auto numRects = rects.size();
|
||||
|
||||
if (numRects == 0)
|
||||
return;
|
||||
|
||||
const auto x1 = rect.getX();
|
||||
const auto y1 = rect.getY();
|
||||
const auto x2 = x1 + rect.getWidth();
|
||||
|
|
@ -248,17 +251,16 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
if (rx1 < x2 && x1 < rx2 && ry1 < y2 && y1 < ry2)
|
||||
{
|
||||
if (! (rx1 < x2 && x1 < rx2 && ry1 < y2 && y1 < ry2))
|
||||
continue;
|
||||
|
||||
if (rx1 < x1 && x1 < rx2)
|
||||
{
|
||||
if (y1 <= ry1 && ry2 <= y2 && rx2 <= x2)
|
||||
{
|
||||
r.setWidth (x1 - rx1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (const RectangleType newRect (rx1, ry1, x1 - rx1, ry2 - ry1); isNotEqual (newRect))
|
||||
else if (const RectangleType newRect (rx1, ry1, x1 - rx1, ry2 - ry1); isNotEqual (newRect))
|
||||
{
|
||||
r.setX (x1);
|
||||
r.setWidth (rx2 - x1);
|
||||
|
|
@ -267,7 +269,6 @@ public:
|
|||
++i;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (rx1 < x2 && x2 < rx2)
|
||||
{
|
||||
r.setX (x2);
|
||||
|
|
@ -288,9 +289,7 @@ public:
|
|||
{
|
||||
r.setHeight (y1 - ry1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (const RectangleType newRect (rx1, ry1, rx2 - rx1, y1 - ry1); isNotEqual (newRect))
|
||||
else if (const RectangleType newRect (rx1, ry1, rx2 - rx1, y1 - ry1); isNotEqual (newRect))
|
||||
{
|
||||
r.setY (y1);
|
||||
r.setHeight (ry2 - y1);
|
||||
|
|
@ -299,7 +298,6 @@ public:
|
|||
++i;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ry1 < y2 && y2 < ry2)
|
||||
{
|
||||
r.setY (y2);
|
||||
|
|
@ -320,8 +318,6 @@ public:
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Removes all areas in another RectangleList from this one.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue