| @@ -23,6 +23,10 @@ START_NAMESPACE_DGL | |||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| template<typename> class Rectangle; | |||||
| // ----------------------------------------------------------------------- | |||||
| template<typename T> | template<typename T> | ||||
| class Point | class Point | ||||
| { | { | ||||
| @@ -51,8 +55,6 @@ public: | |||||
| private: | private: | ||||
| T fX, fY; | T fX, fY; | ||||
| template<typename> friend class Rectangle; | template<typename> friend class Rectangle; | ||||
| DISTRHO_PREVENT_HEAP_ALLOCATION | |||||
| }; | }; | ||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| @@ -87,8 +89,6 @@ public: | |||||
| private: | private: | ||||
| T fWidth, fHeight; | T fWidth, fHeight; | ||||
| template<typename> friend class Rectangle; | template<typename> friend class Rectangle; | ||||
| DISTRHO_PREVENT_HEAP_ALLOCATION | |||||
| }; | }; | ||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| @@ -144,8 +144,6 @@ public: | |||||
| private: | private: | ||||
| Point<T> fPos; | Point<T> fPos; | ||||
| Size<T> fSize; | Size<T> fSize; | ||||
| DISTRHO_PREVENT_HEAP_ALLOCATION | |||||
| }; | }; | ||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| @@ -53,9 +53,6 @@ public: | |||||
| void setPos(int x, int y); | void setPos(int x, int y); | ||||
| void setPos(const Point<int>& pos); | void setPos(const Point<int>& pos); | ||||
| void moveBy(int x, int y); | |||||
| void moveBy(const Point<int>& pos); | |||||
| int getWidth() const noexcept; | int getWidth() const noexcept; | ||||
| int getHeight() const noexcept; | int getHeight() const noexcept; | ||||
| const Size<int>& getSize() const noexcept; | const Size<int>& getSize() const noexcept; | ||||
| @@ -108,23 +108,6 @@ void Widget::setPos(const Point<int>& pos) | |||||
| fParent.repaint(); | fParent.repaint(); | ||||
| } | } | ||||
| void Widget::moveBy(int x, int y) | |||||
| { | |||||
| fArea.moveBy(x, y); | |||||
| fParent.repaint(); | |||||
| } | |||||
| void Widget::moveBy(const Point<int>& pos) | |||||
| { | |||||
| Point<int> movedPos = fArea.getPos() + pos; | |||||
| if (fArea.getPos() == movedPos) | |||||
| return; | |||||
| fArea.moveBy(pos); | |||||
| fParent.repaint(); | |||||
| } | |||||
| int Widget::getWidth() const noexcept | int Widget::getWidth() const noexcept | ||||
| { | { | ||||
| return fArea.getWidth(); | return fArea.getWidth(); | ||||
| @@ -71,7 +71,7 @@ class DistrhoLeakedObjectDetector | |||||
| { | { | ||||
| public: | public: | ||||
| //============================================================================== | //============================================================================== | ||||
| DistrhoLeakedObjectDetector() noexcept { ++(getCounter().numObjects); } | |||||
| DistrhoLeakedObjectDetector() noexcept { ++(getCounter().numObjects); } | |||||
| DistrhoLeakedObjectDetector(const DistrhoLeakedObjectDetector&) noexcept { ++(getCounter().numObjects); } | DistrhoLeakedObjectDetector(const DistrhoLeakedObjectDetector&) noexcept { ++(getCounter().numObjects); } | ||||
| ~DistrhoLeakedObjectDetector() noexcept | ~DistrhoLeakedObjectDetector() noexcept | ||||