1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Modernised a few RectangleList iterators

This commit is contained in:
jules 2017-04-03 16:08:07 +01:00
parent d5c019e983
commit 38d49a5ee7
12 changed files with 66 additions and 64 deletions

View file

@ -1200,15 +1200,15 @@ struct StateHelpers
void add (const RectangleList<int>& list, const PixelARGB colour) noexcept
{
for (const Rectangle<int>* i = list.begin(), * const e = list.end(); i != e; ++i)
add (*i, colour);
for (auto& i : list)
add (i, colour);
}
void add (const RectangleList<int>& list, const Rectangle<int>& clip, const PixelARGB colour) noexcept
{
for (const Rectangle<int>* i = list.begin(), * const e = list.end(); i != e; ++i)
for (auto& i : list)
{
const Rectangle<int> r (i->getIntersection (clip));
auto r = i.getIntersection (clip);
if (! r.isEmpty())
add (r, colour);