From 62e42408485e9e1b7e939925b650a4b2e90ecddb Mon Sep 17 00:00:00 2001 From: neoraider Date: Fri, 21 Sep 2007 21:47:05 +0000 Subject: zoomedit: Big transition Ciaro -> OpenGL, enormous speedup! --- Rectangle.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'Rectangle.h') diff --git a/Rectangle.h b/Rectangle.h index 8a61321..5e7bb94 100644 --- a/Rectangle.h +++ b/Rectangle.h @@ -18,13 +18,9 @@ class Rectangle { Vertex v1, v2; public: Rectangle() {} - Rectangle(const Vertex& v1, const Vertex& v2) { - this->v1 = v1; this->v2 = v2; - } - Rectangle(double x, double y, double width, double height) { - v1.setLocation(x, y); - v2.setLocation(x+width, y+height); - } + Rectangle(const Vertex& vertex1, const Vertex& vertex2) : v1(vertex1), v2(vertex2) {} + Rectangle(double x, double y, double width, double height) + : v1(x, y), v2(x+width, y+height) {} Vertex &getVertex1() {return v1;} const Vertex &getVertex1() const {return v1;} -- cgit v1.2.3