From 10da8c7175f3e586e3b2ebab83669d71f403ba5f Mon Sep 17 00:00:00 2001 From: twanvl Date: Wed, 31 Dec 2008 15:25:34 +0000 Subject: [PATCH] fix warnings about fabs(Scriptable) git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1276 0fc631ac-6414-0410-93d0-97cfa31319b6 --- src/data/field.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/data/field.cpp b/src/data/field.cpp index aee4883a..6b81e33f 100644 --- a/src/data/field.cpp +++ b/src/data/field.cpp @@ -132,7 +132,7 @@ inline bool is_set(const Scriptable& x) { return x.isScripted() || x < 100000; } inline bool is_setw(const Scriptable& x) { - return x.isScripted() || fabs(x) > 0.001; + return x.isScripted() || fabs(x()) > 0.001; } int Style::update(Context& ctx) { @@ -188,12 +188,12 @@ int Style::update(Context& ctx) { bool Style::isVisible() const { return visible - && (width) > 0 - && fabs(left) < 100000 - && fabs(right) < 100000 - && (height) > 0 - && fabs(top) < 100000 - && fabs(bottom) < 100000; + && (width()) > 0 + && fabs(left()) < 100000 + && fabs(right()) < 100000 + && (height()) > 0 + && fabs(top()) < 100000 + && fabs(bottom()) < 100000; } bool Style::hasSize() const { int h = is_setw(width) + is_set(left) + is_set(right);