aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/rect.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/common/rect.h b/common/rect.h
index 391eb32f90..420be79ddd 100644
--- a/common/rect.h
+++ b/common/rect.h
@@ -36,7 +36,7 @@ struct Point {
Point() : x(0), y(0) {};
Point(const Point & p) : x(p.x), y(p.y) {};
- explicit Point(int x, int y) : x(x), y(y) {};
+ explicit Point(int x1, int y1) : x(x1), y(y1) {};
Point & operator=(const Point & p) { x = p.x; y = p.y; return *this; };
bool operator==(const Point & p) const { return x == p.x && y == p.y; };
};
@@ -51,9 +51,8 @@ struct Rect {
int bottom, right; //!< The point at the bottom right of the rectangle (not part of the rect).
Rect() : top(0), left(0), bottom(0), right(0) {}
- Rect(int x, int y) : _topLeft(0, 0), _bottomRight(x, y) {}
+ Rect(int x, int y) : top(0), left(0), bottom(x), right(y) {}
Rect(int x1, int y1, int x2, int y2) : top(x1), left(y1), bottom(x2), right(y2) {}
- Point size() const { return (_bottomRight - _topLeft); };
int width() const { return right - left; }
int height() const { return top - bottom; }