aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFelix Domke <felix.domke@multimedia-labs.de>2009-07-17 12:46:37 +0200
committerFelix Domke <felix.domke@multimedia-labs.de>2009-07-17 12:46:37 +0200
commitf27bd5e1b2c49b0db87dbac70298ad33d2e4d537 (patch)
tree2d10a66a2d01d1df5fcd27feded1b3c8d6c38abf /lib
parent767c0c99050c9ba714841d556065653011a3bc68 (diff)
downloadenigma2-f27bd5e1b2c49b0db87dbac70298ad33d2e4d537.tar.gz
enigma2-f27bd5e1b2c49b0db87dbac70298ad33d2e4d537.zip
un-inline scale, assert non-zero denominators
Diffstat (limited to 'lib')
-rw-r--r--lib/gdi/erect.cpp11
-rw-r--r--lib/gdi/erect.h8
2 files changed, 12 insertions, 7 deletions
diff --git a/lib/gdi/erect.cpp b/lib/gdi/erect.cpp
index 43cefc53..c17c5cf3 100644
--- a/lib/gdi/erect.cpp
+++ b/lib/gdi/erect.cpp
@@ -1,4 +1,5 @@
#include <lib/gdi/erect.h>
+#include <lib/base/eerror.h>
/*****************************************************************************
eRect member functions
@@ -201,3 +202,13 @@ bool operator!=( const eRect &r1, const eRect &r2 )
{
return r1.x1!=r2.x1 || r1.x2!=r2.x2 || r1.y1!=r2.y1 || r1.y2!=r2.y2;
}
+
+void eRect::scale(int x_n, int x_d, int y_n, int y_d)
+{
+ ASSERT(x_d); ASSERT(y_d);
+ x1 *= x_n; x1 /= x_d;
+ x2 *= x_n; x2 /= x_d;
+ y1 *= y_n; y1 /= y_d;
+ y2 *= y_n; y2 /= y_d;
+}
+
diff --git a/lib/gdi/erect.h b/lib/gdi/erect.h
index 34713ab4..35ebeda1 100644
--- a/lib/gdi/erect.h
+++ b/lib/gdi/erect.h
@@ -119,13 +119,7 @@ public:
static eRect emptyRect() { return eRect(0, 0, 0, 0); }
static eRect invalidRect() { return eRect(); }
- inline void scale(int x_n, int x_d, int y_n, int y_d)
- {
- x1 *= x_n; x1 /= x_d;
- x2 *= x_n; x2 /= x_d;
- y1 *= y_n; y1 /= y_d;
- y2 *= y_n; y2 /= y_d;
- }
+ void scale(int x_n, int x_d, int y_n, int y_d);
private:
int x1;