Browse Source

Cleanup

gh-pages
falkTX 11 years ago
parent
commit
db1ec7ea52
4 changed files with 5 additions and 27 deletions
  1. +4
    -6
      dgl/Geometry.hpp
  2. +0
    -3
      dgl/Widget.hpp
  3. +0
    -17
      dgl/src/Widget.cpp
  4. +1
    -1
      distrho/extra/d_leakdetector.hpp

+ 4
- 6
dgl/Geometry.hpp View File

@@ -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
}; };


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


+ 0
- 3
dgl/Widget.hpp View File

@@ -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;


+ 0
- 17
dgl/src/Widget.cpp View File

@@ -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();


+ 1
- 1
distrho/extra/d_leakdetector.hpp View File

@@ -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


Loading…
Cancel
Save