Rectangles list is STL now.
This commit is contained in:
21
dw/types.hh
21
dw/types.hh
@ -5,6 +5,9 @@
|
||||
# error Do not include this file directly, use "core.hh" instead.
|
||||
#endif
|
||||
|
||||
#include <memory>
|
||||
#include <list>
|
||||
|
||||
namespace dw {
|
||||
namespace core {
|
||||
|
||||
@ -140,20 +143,22 @@ public:
|
||||
class Region
|
||||
{
|
||||
private:
|
||||
lout::container::typed::List <Rectangle> *rectangleList;
|
||||
std::list< std::unique_ptr< Rectangle > > rectangleList;
|
||||
|
||||
public:
|
||||
Region ();
|
||||
~Region ();
|
||||
|
||||
void clear () { rectangleList->clear (); };
|
||||
void clear () { rectangleList.clear(); }
|
||||
|
||||
void addRectangle (Rectangle *r);
|
||||
|
||||
lout::container::typed::Iterator <Rectangle> rectangles ()
|
||||
auto begin()
|
||||
{
|
||||
return rectangleList->iterator ();
|
||||
};
|
||||
return rectangleList.begin();
|
||||
}
|
||||
|
||||
auto end()
|
||||
{
|
||||
return rectangleList.end();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user